Skip to Content
API referenceDocument Conversion, Errors and Limits

Document Conversion, Errors and Limits

Applies to /api/v1/pdf_handler/. See Errors for the platform-wide status reference.

Status codes to handle

POST /convert/ and POST /convert/json/

StatuserrorCauseRetry?
202Accepted; poll GET /conversion/{id}/.
400target_formats is requiredNo target_formats and no options.Fix the request.
400unsupported_output_formatAn output format the service does not produce. formats lists the offenders.Fix the request.
400unsupported_conversionThe pair is not available. input_format and output_formats name it.Fix the request.
400Unsupported input file format: …The input extension is not accepted.Fix the request.
400unknown_engineThe engine you forced does not exist.Fix the request.
400Provide either a file, an s3_key, or a urlNo input source.Fix the request.
400Provide only one of file, s3_key, or urlMore than one input source.Fix the request.
400file_content_mismatchThe bytes do not match the extension. claimed and detected say what was found.Fix the file.
402anonymous_quota_exceededDaily free allowance used up. limit, used_today, and remaining are included.Tomorrow, or sign in.
402Insufficient balance / Insufficient creditSigned in, balance below the price.After topping up.
400options is malformed.Fix the request.
404The s3_key names an object that is not yours.Fix the request.
413File size exceeds the NMB limit for …Upload over the cap for your tier.No, send a smaller file.
429throttle.rate_limitedToo many requests, see Rate limits.After Retry-After.
503quota_check_failedThe quota service could not be reached; the request was refused rather than risk a free ride.Yes, shortly.

A rejected request never creates a conversion and never spends a credit.

GET /conversion/{id}/

StatusCause
200Status returned. Read status, then download_url.
404Unknown or removed conversion id.

A failed conversion is still a 200, the failure is in the body (status: "failed", error_message), not in the status code. Check both.

GET /{id}/download/

StatusCause
200The file, streamed, with a Content-Disposition filename.
302Redirect to the file at your cloud destination. Follow it.
400file not ready, the conversion has produced no output yet.
404Unknown or removed conversion, or one that is not yours.
410{"detail": "Output expired"}: the files were purged after the retention window.
500Storage read failed. Safe to retry.

POST /save/

StatusCause
201Saved and delivered.
400file_or_file_base64_required, invalid_base64, or missing_<provider>_token.

Rate limits

Every endpoint is rate limited. Over the limit, a request answers 429 with a Retry-After header (seconds) and the body {"error": "throttle.rate_limited", "detail": "…", "retry_after_seconds": 42}. Wait that long before sending it again. The official SDKs do this for you, and Error codes lists the related sign-in limits.

Idempotency

POST /convert/ and POST /convert/json/ accept an optional Idempotency-Key header. Send a UUID v4 that stays stable across retries of the same intent:

Idempotency-Key: 3f8a1c22-7d4e-4b91-a0f5-9c2e6b7d1a44
SituationResult
First request with a key202, the conversion is created as normal
Retry with the same key and the same payload202, returns the original conversion, no second job, no second charge
Same key, different payload422 Idempotency-Key reused with a different payload
No header at allUnchanged behaviour, every call creates a new conversion

The header is optional. If you omit it, a blind retry after a timeout can create a second conversion, so either send a key or poll GET /history/ before resubmitting.

Keys are scoped to the caller, so two different accounts may use the same key value without colliding.

File size

CallerMaximum upload to /convert/
Anonymous (free tier)5 MB
Signed in25 MB

These are the platform defaults and can be raised by the operator, up to 500 MB. Over the limit you get 413 with the effective limit stated in the message; nothing is stored and no credit is spent.

The cap applies to the multipart upload itself. A url or s3_key input is not measured against it.

Credits

  • Anonymous callers get 10 credits per day, counted per device. Each requested output format costs one credit, so a single pdf,docx request costs two.
  • Signed-in callers spend from their balance at the price on the rate card.

Retention

Converted and saved files are deleted from storage on a schedule. The history row, filename, formats, status, timestamps, is kept, so an expired conversion still appears in GET /history/, but downloading it answers 410.

CallerFiles kept
Anonymous (free tier)24 hours after the conversion reaches a terminal state
Signed in180 days after the conversion was created

The purge runs hourly, so deletion happens shortly after the window closes, not to the second. These are the default windows and are operator-configurable, check your plan if you depend on a specific figure. Download anything you need to keep, or send it straight to a cloud destination, where indox’s retention does not apply. A signed-in owner can shorten the window for one conversion with keep_policy, or copy its output into their indox files, see Keep, retry, save and email.