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.conversion.wait(job["id"], timeout=120) # works for any converter
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.conversion |
one get / wait / delete for any conversion id, whichever converter made it |
client.pdf |
document conversion, retry, keep policy, save to files, email, form fields, pipelines, phone scan, e-signing |
client.pdf.forms |
public IRS/USCIS blank forms: list, fields, blank download URL, fill |
client.pdf.ai |
ask, fill, detect fields, suggest comments, check numbers, classify, edit (credits; poll job) |
client.docs |
document job status, batches, credits |
client.fonts |
formats, quota, upload, convert (with optional subsetting), validate, inspect, download |
client.deck |
AI slide decks: templates (and brands), sources, images, projects, research, authoring, quality, edit, fill, from_image, narration, documents |
client.office |
office documents (sheet/doc/slide), import/export jobs and downloads |
client.webhooks |
create, list, update, delete, deliveries, test, rotate secret |
client.user |
login/2FA/refresh, profile, avatar, branding, integrations, preferences, storage (incl. presigned uploads), usage, share links |
client.notifications |
in-app notifications and email notification settings |
client.storage |
connected Box / Dropbox / Google Drive / OneDrive: status(provider), contents(provider) |
client.audit |
your audit log: list, CSV export |
client.billing |
credit balance, low-balance thresholds, rate card, current subscription, usage by feature, plans, purchases |
Operations that start AI or paid work (deck stages, authoring, research, narration,
pdf.ai, office import/export) spend credits; poll their job endpoints for the result.
Signing in (account operations)
API keys convert files; they cannot manage the account. These six calls answer 403 to an API
key and need a sign-in access token instead: user.update_me, user.create_share,
user.delete_share, billing.purchase_initiate, billing.purchase_pay_as_you_go,
billing.storage_initiate. Pass it per call with access_token=:
from indox_client import Indox, MfaRequired
with Indox() as client:
try:
session = client.user.login(email="me@example.com", password="...")
except MfaRequired as challenge:
session = client.user.complete_2fa(challenge.mfa_token, input("2FA code: "))
token = session["external_token"]
client.user.update_me(first_name="Ada", access_token=token)
client.user.refresh() returns a new external_token. Call it on the same client that logged
in: the refresh token comes back as a cookie, not in the body. Login takes a JSON body only.
Errors, retries and timeouts
Failures raise typed exceptions, all importable from indox_client and all
subclasses of IndoxError.
Errors carrying an HTTP response expose status_code and the parsed response:
| Exception | When |
|---|---|
BadRequestError |
400, and 422 validation errors |
AuthenticationError |
401; its subclass MfaRequired (with mfa_token) when login needs a 2FA code |
PaymentRequiredError |
402, not enough credits |
PermissionDeniedError |
403; its subclass ScopeError when the API key lacks the scope (auth.api_key_scope_missing) |
NotFoundError |
404, including ids you do not own |
GoneError |
410, an expired output or signing link |
RateLimitError |
429 after the retries below ran out; retry_after holds the server hint in seconds |
InternalServerError |
5xx |
APIStatusError |
any other status (e.g. 409) |
The message comes from the body's detail (a string, or a list of validation errors
rendered as body.field: reason), falling back to error:
from indox_client import Indox, BadRequestError
try:
client.images.convert("photo.png", target_format="nope")
except BadRequestError as exc:
print(exc.status_code, exc.message, exc.response)
APIConnectionError (the request never reached the API) and ConversionError (a job
failed server-side) have no HTTP status. Catch IndoxError to cover everything.
Every endpoint is rate limited. The client retries for you:
- 429 on any method: waits
Retry-After(seconds or an HTTP date), otherwise exponential backoff with jitter, then retries. - 502 / 503 / 504 on
GETonly; other methods are never replayed. - At most 3 retries, and no single wait longer than 60 s. Then the error is raised.
Tune it per client (defaults are the module constants DEFAULT_MAX_RETRIES,
DEFAULT_MAX_RETRY_WAIT, DEFAULT_RETRY_BACKOFF); max_retries=0 turns retrying off:
Indox(max_retries=5, max_retry_wait=30.0, retry_backoff=1.0)
Requests use a 5 s connect / 60 s read timeout by default:
Indox(timeout=(5.0, 120.0)) to change it.
Upgrading from 0.7
- Breaking:
pdf.run_pipeline(pipeline_id, file_path=None, *, data=None)uploads the PDF as multipart. It used to takepayloadand send JSON with no file, which the server could not run. Pass the PDF path, and any extra form fields indata. - New: a typed
client.pdfmethod for each of the 50 convert-based PDF tools, e.g.client.pdf.flatten("in.pdf", flatten=True), plusrun_tool,list_toolsanddescribe_toolover the packagedpdf-tools.jsoncatalog.
Upgrading from 0.5
user.update_me(...)takesusername,first_name,last_namekeywords;emailmoved touser.change_email(email, current_password=...).user.upload_file(path, related_task_id=None):s3_keyandstorage_already_trackedare gone.images/videos/models.convert:user_idwas removed; passing it indataraisesValueError.pdf.submit_sign(token, otp=None, *, consent, name=None, date=None, signature=None):consentis required; pass the emailed code frompdf.request_sign_otp(token)whenpdf.get_sign_token(token)reportsrequire_code. Sessions returnsigned_url(wassigned_s3_key), the sign view returnsdocument_url(wasdownload_key), and participants no longer carrysign_path.pdf.create_signing_session(path, emails=[...], title=None)uploads the PDF (multipart).docs.batch_collect(ids)anddocs.hide(ids)take a list of UUIDs.billing.task_completion: the server ignorescredit_costand theoutput_*fields; sendtask_type.client.fonts.health()andclient.fonts.quota()return the new shapes (engines,storage,max_upload_mb, …).- A convert started with a
redirect_urlreturns acallback_signing_key; the callback is signed with it under the eventconversion.callback. - Waits now return a
partialconversion (some formats succeeded) instead of timing out.
Links
- Docs — https://indox.org/en-US/developers/sdk/python/
- Indox — https://indox.org
Metadata
Release files for indox-client 0.10.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 | Provenance | Actions |
|---|---|---|---|---|
| indox_client-0.10.0.tar.gz | 50.7 kB | Without provenance | Details for indox_client-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| indox_client-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for indox_client-0.10.0-py3-none-any.whl |
Total release size: 120.7 kB
Release files / indox_client-0.10.0.tar.gz
| Download URL | indox_client-0.10.0.tar.gz |
|---|---|
| Size | 50.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30a3fa5e0033b031b074f1919992cd160682345a1f9cd36f62b966c814569233
|
|
BLAKE2b-256 checksum How to use checksums |
1b8ca50fcc3ea4746a92f5e9cdd6475d3b9d9099d004ef79d2fa2a0c1af51753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / indox_client-0.10.0-py3-none-any.whl
| Download URL | indox_client-0.10.0-py3-none-any.whl |
|---|---|
| Size | 70.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de63e5ed42d1b1388e5249dfacaa9cbd7d91fad75e619fd44e8be37414c14c87
|
|
BLAKE2b-256 checksum How to use checksums |
89d26559252eb93470dba62994c315c6cb512963be93b08cead4f1a1605fc9cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for indox-client 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.