Official Python client for the Kreuzberg Cloud document-processing API.
Project description
kreuzberg-cloud-sdk
Official Python client for the Kreuzberg Cloud document-processing API.
- httpx-based, sync (
KreuzbergCloud) and async (AsyncKreuzbergCloud) surfaces - Generated from the upstream OpenAPI 3.1 spec, then wrapped in ergonomic helpers
- Type-annotated end to end,
py.typedshipped - Zero-friction onboarding via
from_sandbox()— no signup needed for evaluation
Install
pip install kreuzberg-cloud-sdk
# or
uv add kreuzberg-cloud-sdk
Requires Python 3.10+.
Quickstart
Sync — single file with explicit API key
from pathlib import Path
from kreuzberg_cloud import KreuzbergCloud
with KreuzbergCloud(api_key="sk_live_...") as client:
job = client.extract_and_wait(file=Path("invoice.pdf"))
if job.result is not None:
print(job.result.content)
Async — batch extract with parallel waits
import asyncio
from pathlib import Path
from kreuzberg_cloud import AsyncKreuzbergCloud
async def main() -> None:
async with AsyncKreuzbergCloud(api_key="sk_live_...") as client:
jobs = await client.extract_batch([Path("a.pdf"), Path("b.pdf"), Path("c.pdf")])
results = await client.wait_for_jobs([str(j.id) for j in jobs])
for job in results:
print(job.filename, job.status)
asyncio.run(main())
Async — sandbox onboarding (no API key required)
import asyncio
from kreuzberg_cloud import AsyncKreuzbergCloud
async def main() -> None:
async with await AsyncKreuzbergCloud.from_sandbox() as client:
job = await client.extract_and_wait(file=b"hello world")
print(job.status, job.result and job.result.content)
asyncio.run(main())
Public API
The following methods are available on both KreuzbergCloud (sync) and
AsyncKreuzbergCloud (async):
| Method | Purpose |
|---|---|
extract(file=..., options=...) |
Submit one document, get back a Job. |
extract_batch(files, options=...) |
Submit many documents (parallel for async). |
get_job(job_id) |
Fetch current job status / result. |
wait_for_job(job_id, timeout=300, ...) |
Poll until terminal status. |
wait_for_jobs(job_ids, ...) |
Wait for multiple jobs. |
extract_and_wait(file=..., ...) |
Submit + wait in one call. |
create_sandbox_key() |
Mint an ephemeral sandbox API key. |
from_sandbox() (classmethod) |
Build a client preconfigured with a sandbox key. |
Errors are raised as one of:
KreuzbergCloudError (base), AuthError, ValidationError, NotFoundError,
RateLimitError (carries retry_after), ServerError, TimeoutError.
Documentation
Full reference and guides: https://docs.kreuzberg.cloud
License
MIT — © Kreuzberg, Inc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kreuzberg_cloud_sdk-0.0.1.tar.gz.
File metadata
- Download URL: kreuzberg_cloud_sdk-0.0.1.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f332e6fa333a98ee9dfe91dd2a2206024e52a7e07c4fb677dc82cc0bb569876
|
|
| MD5 |
caf4796d18996b2bc629c0fd328c54d6
|
|
| BLAKE2b-256 |
5761b69069806b5e21636abd78e85d6b9992881c0926805063cc535de9f5066e
|
Provenance
The following attestation bundles were made for kreuzberg_cloud_sdk-0.0.1.tar.gz:
Publisher:
publish.yaml on kreuzberg-dev/kreuzberg-cloud-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kreuzberg_cloud_sdk-0.0.1.tar.gz -
Subject digest:
1f332e6fa333a98ee9dfe91dd2a2206024e52a7e07c4fb677dc82cc0bb569876 - Sigstore transparency entry: 1490116823
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/kreuzberg-cloud-sdk@a3e89673cd3b952ad8b64a3c5d54d1d075cadb6b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a3e89673cd3b952ad8b64a3c5d54d1d075cadb6b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file kreuzberg_cloud_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kreuzberg_cloud_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 89.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c37909b7bf6839aeebe94d923a7f1082088b1caa3d2caf2080fa0c8832396f04
|
|
| MD5 |
f61db7f784547a59f49e998bc108d6c5
|
|
| BLAKE2b-256 |
a521559ea256645471070853fffa71cebae777db493106e0153f7402d6fcbfe8
|
Provenance
The following attestation bundles were made for kreuzberg_cloud_sdk-0.0.1-py3-none-any.whl:
Publisher:
publish.yaml on kreuzberg-dev/kreuzberg-cloud-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kreuzberg_cloud_sdk-0.0.1-py3-none-any.whl -
Subject digest:
c37909b7bf6839aeebe94d923a7f1082088b1caa3d2caf2080fa0c8832396f04 - Sigstore transparency entry: 1490116933
- Sigstore integration time:
-
Permalink:
kreuzberg-dev/kreuzberg-cloud-sdk@a3e89673cd3b952ad8b64a3c5d54d1d075cadb6b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kreuzberg-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@a3e89673cd3b952ad8b64a3c5d54d1d075cadb6b -
Trigger Event:
workflow_dispatch
-
Statement type: