Credits and error handling
How executions are priced and settled, and what every error code means.
| Band | Cost per execution | Typical work |
|---|---|---|
| Light | 2 credits | Format conversion, inspection, small re-encodes |
| Standard | 5 credits | Document and image processing, data profiling |
| Heavy | 8 credits | Archive extraction, OCR and multi-document jobs |
A tool's own definition sets its price; the catalogue always tells you the exact number. Nothing varies by file size or workload.
Reservation and settlement
When a job is admitted, its price is reserved: moved from your wallet's available credits into reserved. When the job finishes:
- Success — the reservation settles into a permanent debit on the ledger.
- Failure, cancellation or timeout — the reservation is released and the credits return to available.
You are never charged for a job that did not produce a result. The wallet endpoints show both sides:
GET /v1/wallet/balance
→ {"available_credits": 98, "reserved_credits": 2}and the transaction history lists every settle, release and package purchase with its running deltas.
Insufficient credits
A job is admitted only if the available balance can cover its
reservation. Otherwise it answers HTTP 402 with code
J_WALLET_INSUFFICIENT and the job is not created.
Check the balance before large batches rather than retrying
blindly.
Idempotent retries
Network failures mid-request are safe to retry when you send an
Idempotency-Key: the same key with the same content
replays the same job (200, deduplicated: true, one
reservation). Different content under a used key answers 409
J_IDEMPOTENCY_CONFLICT. Keep one key per logical job,
not per attempt.
Errors
One shape everywhere, with an X-Error-Code header
carrying the same code:
{"code": "J_WALLET_INSUFFICIENT",
"message": "This wallet does not have enough credits for that job.}"| Code | HTTP | Meaning |
|---|---|---|
J_CREDENTIAL_INVALID | 401 | Missing, revoked or unknown token. |
J_WALLET_INSUFFICIENT | 402 | Not enough available credits for the reservation. |
J_TOOL_NOT_COMMERCIAL | 404 | The tool is not available through the API (or does not exist). |
J_NOT_FOUND | 404 | Unknown job, a job from another wallet, or (on outputs) an index past the end. |
J_IDEMPOTENCY_CONFLICT | 409 | A used idempotency key with different content. |
J_NOT_DELIVERABLE | 409 | Outputs requested before the job finished. |
J_NOT_CANCELABLE | 409 | The job is past the cancellable states. |
V_MISSING_PARAM
V_UNKNOWN_PARAMV_INVALID_PARAM |
422 | The parameters did not satisfy the tool's published schema: a required option was absent, an undeclared one was sent, or a value broke a constraint. The tool's catalogue entry defines the schema. |
V_INVALID / other V_* |
4xx | Invalid input: body, files, e-mail, idempotency. |
V_UPLOAD_TIMEOUT | 408 | The upload took too long to send. |
R_RATE_LIMIT | 429 | Too many requests; wait for Retry-After
seconds. |
R_EXPIRED | 410 | The output's retention window has closed. |
R_UNPAID | 402 | Internal consistency check on an unsettled job; retry shortly. |
P_ / S_ | 5xx | Tool or platform fault; the job's error block says
retryable: true where a retry is worth it. |
Retries and limits
Rate limits apply per credential (and per IP for the open
catalogue); the response says Retry-After. Recoverable
body failures (V_*: validation) are worth fixing, not
retrying; 5xx platform faults are worth retrying with your
idempotency key after a short wait. Anything you cannot identify
is unlikely to improve by retrying; check the message first.
The commercial terms
The prepaid model on this page is part of a contract: the terms of service cover payment, credits, acceptable use, liability and how both sides stand if something goes wrong. The privacy notice describes what the service retains about paid use; the security page describes how your token is stored and what the isolation guarantees. Read them; they bind the same way these docs describe the API.