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
Metadata
Release files for indox-client 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| indox_client-0.5.0.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indox_client-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.5 kB
Release files / indox_client-0.5.0.tar.gz
| Download URL | indox_client-0.5.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
775151d3fab0ba35e1641a4e26cc7e50767033119bc9cb1dbf05d271e87b2b03
|
|
BLAKE2b-256 checksum How to use checksums |
00b87c94595a500b3992d5fbfbd93c093c4ac5b23405571f4dae67bbb6d08cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / indox_client-0.5.0-py3-none-any.whl
| Download URL | indox_client-0.5.0-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
027c10ecb20b37370d9741b288fa39cda500e6557f9f6e1e4c7aedf2928199aa
|
|
BLAKE2b-256 checksum How to use checksums |
7e0dbf95b74c51c2994142ab8aa5e8eea79ebd15ac25b675ac13bfede425874a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|