indox-client
Python SDK for the Indox API v1 — document, image, video, 3D-model and font conversion.
Requires: Python ≥ 3.9 · requests ≥ 2.28
Install
pip install indox-client
Authenticate
Create an API key in your Indox dashboard under API Keys. The value is shown once at
creation and starts with ak_.
Pass it directly, or set INDOX_API_KEY and let the client pick it up:
export INDOX_API_KEY='ak_your_key_here'
from indox_client import Indox
with Indox() as client: # reads INDOX_API_KEY
print(client.health.get())
with Indox(api_key="ak_...") as client: # or pass it explicitly
...
The client defaults to https://indox.org. Point it elsewhere only if you run your own
instance — Indox(base_url="https://api.example.com"), or set INDOX_BASE_URL.
Convert a file
Conversions are asynchronous: submit, poll, download.
from indox_client import Indox
with Indox() as client:
job = client.images.convert("photo.png", target_format="webp")
done = client.images.wait(job["id"], timeout=120)
client.media.download(job["id"], "photo.webp")
Fonts have a one-call helper that does all three steps:
with Indox() as client:
client.fonts.convert_and_download(
"MyFont.ttf", target_format="woff2", output_path="MyFont.woff2"
)
Before spending credits, you can check a conversion is supported:
client.fonts.validate("MyFont.ttf", target_format="woff2")
# {'valid': True, 'input': 'ttf', 'output': 'woff2',
# 'engine': 'fonttools', 'credits': 1, 'error': None}
Discover what is supported
client.images.formats() # image formats and pairs
client.videos.formats()
client.models.formats()
client.pdf.formats()
client.fonts.formats.list()
client.fonts.formats.get("ttf")
Resources
| Attribute | Covers |
|---|---|
client.health |
service health |
client.images · client.videos · client.models |
media conversion |
client.media |
media job status, downloads, batches, credits |
client.pdf |
document conversion, form fields, pipelines, phone scan, e-signing |
client.docs |
document job status, batches, credits |
client.fonts |
formats, quota, upload, convert, validate, inspect, download |
client.webhooks |
create, list, update, delete, deliveries, test |
client.user |
profile, storage, usage, share links |
client.billing |
credit balance, plans, purchases |
Errors and timeouts
Failures raise typed exceptions, all importable from indox_client and all
subclasses of IndoxError.
Errors carrying an HTTP response — BadRequestError, AuthenticationError,
PermissionDeniedError, NotFoundError, RateLimitError, APIStatusError — expose
status_code and the parsed response:
from indox_client import Indox, BadRequestError
try:
client.images.convert("photo.png", target_format="nope")
except BadRequestError as exc:
print(exc.status_code, exc.response)
# 400 {'non_field_errors': ['Unsupported output file format: nope']}
APIConnectionError (the request never reached the API) and ConversionError (a job
failed server-side) have no HTTP status. Catch IndoxError to cover everything.
Requests use a 5 s connect / 60 s read timeout by default:
Indox(timeout=(5.0, 120.0)) to change it.
Links
- Source, docs, and SDKs for 7 other languages — https://github.com/nematiai/indox-sdk
- Indox — https://indox.org
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 indox_client-0.4.0.tar.gz.
File metadata
- Download URL: indox_client-0.4.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2602421e4b359e35fcedcaa9baec9427f9ffc703469be38ac71792089d91a71c
|
|
| MD5 |
284329337af39cab97c56cef4ae7c8fc
|
|
| BLAKE2b-256 |
080a38d38cb82cd3e554ba88802e88a2751fa66f628d069d25d4bb296243f417
|
File details
Details for the file indox_client-0.4.0-py3-none-any.whl.
File metadata
- Download URL: indox_client-0.4.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8509aea463c01dee1f412342fa1f3d9c0d8c36b27a9ccc60c2f98fee17e0ae6
|
|
| MD5 |
74d7c92264748a96bcd93d3220825c32
|
|
| BLAKE2b-256 |
085b7f9e91966f50549de24ff3c5d872ebf3995bc9e0067c8e9edff6cb7208b3
|