API v1 documentation

Errors and limits

Plan upload capacity, profile availability, retries, credits, and error handling.

Error envelope

Every API response includes X-Request-ID. Error bodies include a human-readable message, a machine-readable code, and the request ID you can use for support.

Error envelope
{
  "message": "The uploaded file is not supported.",
  "code": "validation_failed",
  "request_id": "req_01jv2f4v3m8x8r7a1p9d0k2m7q",
  "errors": {
    "file": ["The file must be a supported document type."]
  }
}

HTTP status codes

Handle status codes by category first, then branch on the response code when you need specific client behavior.

Status Meaning Client action
401Missing or invalid API token.Create or rotate an account token in the app.
402Extraction-lifecycle modes: available credits do not cover the first page band at the applicable rate. The document is returned with status blocked and no net charge.Review the account's available credits or payment arrangement, then retry the upload. An additional page-band shortfall discovered after 201 is reported asynchronously instead.
403The token cannot access the resource or lacks the required ability.Use a token from the correct account with the required access.
404The resource does not exist or is outside the account.Check the ID and account context.
409The same Idempotency-Key is still processing or was reused with a different payload, an interrupted attempt created a document without finishing the upload response, or document deletion is temporarily unavailable while the current extraction is active.Wait for the original request; for conflict_reason=document_created, delete the returned cleanup-only document.id; retry deletion after active processing finishes; or use a new key for a different upload.
422The request did not pass validation.Fix field errors and submit again.
429Token, account, user, IP, or sandbox limit exceeded.Wait for the full Retry-After period. When retrying an upload, keep the same Idempotency-Key.

Credit availability and usage

Live extraction, analysis, and validation uploads apply credit_cost to the first 1-10 pages before processing begins. Generic extraction, analysis, and validation have a rate of one; an explicitly selected specialized extraction profile can use a different rate. This still applies when allow_ai_processing=false, because that field disables AI only. If available credits do not cover the first band, exdata returns 402, marks the document as blocked, and processing does not begin.

Thumbnail mode

processing_mode=thumbnail does not use credits, trigger auto top-up, or create an extraction run. A live thumbnail upload can therefore return 201 when the account has zero extraction credits.

Page-band calculation

Analysis determines the page count asynchronously. Exdata then calculates usage as credit_cost × started 10-page bands. With a rate of 3, 1-10 pages use 3 credits, 11-20 use 6, and 21-30 use 9. The run keeps the calculated total when a usable result or retrievable extracted fields remain. The per-band rate and current net total are available as latest_extraction_run.credit_cost and latest_extraction_run.credits_charged.

A 201 can still become blocked

The upload response applies credits only for the initial page band. If analysis later discovers another band that available credits cannot cover, the document changes to status: "blocked" with blocked_reason: "page_band_insufficient_credits". Exdata returns the initial credits, so credits_charged becomes 0. Detect this through polling or document.blocked.

Zero-net outcomes

A terminal processing error, including preprocessing failure, returns all applied page-band credits and reports credits_charged: 0 only when neither a usable result nor retrievable extracted fields remain. A completed validation assessment—including not detected, invalid, unsupported, or deterministically not evaluable—is a usable result; technical unavailable is not. Test-mode extraction runs also report zero. Reprocessing after an already charged result reports zero; reprocessing after a fully returned failure receives a new page-band charge if it first leaves a usable result or retrievable extracted fields. Thumbnail-only documents have zero credit usage and no extraction run.

A blocked extraction document keeps the uploaded document record and debugging context. Resolve the account condition, then submit a new logical upload with a new idempotency key if you want to process it.

Rate limits

API requests are limited across several time windows. Authenticated requests can be limited by API token or workspace, test-mode uploads can also be limited by user, and anonymous routes can be limited by IP address. A request must remain within every policy that applies to it.

Upload capacity

Live and test-mode uploads use the workspace's effective profile. Every upload must remain within all five limits in its profile.

Profile Per API token Across the workspace
restricted 30 / minute
300 / hour
60 / minute
600 / hour
1,000 / day
standard 120 / minute
1,500 / hour
240 / minute
3,000 / hour
25,000 / day
trusted 240 / minute
5,000 / hour
480 / minute
10,000 / hour
100,000 / day
high_volume 600 / minute
20,000 / hour
1,200 / minute
40,000 / hour
500,000 / day
enterprise 1,200 / minute
60,000 / hour
2,400 / minute
120,000 / hour
2,000,000 / day

standard is the current default production profile. The API tokens page shows the effective profile and current upload capacity for your workspace. Use those values and the response rate-limit headers when sizing your integration.

Profile availability

Additional capacity profiles may become available as your workspace meets the applicable eligibility requirements. The API tokens page always shows the profile and limits currently applied to your workspace.

Read and delete capacity

Reads and deletes follow the same profile as uploads, so a workspace can always retrieve and remove documents at least as fast as it can create them. Deletes cover DELETE /documents/{id}; every other authenticated GET counts as a read.

Profile Reads per API token Reads across the workspace Deletes per API token Deletes across the workspace
restricted 300 / minute 1,000 / minute 60 / minute 300 / minute
standard 300 / minute 1,000 / minute 120 / minute 300 / minute
trusted 720 / minute 1,440 / minute 240 / minute 480 / minute
high_volume 1,800 / minute 3,600 / minute 600 / minute 1,200 / minute
enterprise 3,600 / minute 7,200 / minute 1,200 / minute 2,400 / minute

Polling a large batch spends the read budget quickly. Poll each document on a backoff rather than in a tight loop, and delete a document as soon as it reaches a terminal status so cleanup keeps pace with uploads.

Other API limits

Reads, deletes, test-mode uploads, and anonymous x402 routes use these additional limits. Anonymous x402 uploads currently return 503; use authenticated REST uploads instead. Test-mode uploads must satisfy both their upload profile and the daily sandbox limits.

Request Token limit Workspace limit Additional limit
Test-mode uploads 10 / day 25 / day 50 / user / day
Anonymous x402 uploads (currently unavailable) 20 / IP / minute
Anonymous x402 status checks 120 / IP / minute

Response headers

A rate-limited response uses status 429. The headers identify the policy that rejected the request and when it can be retried.

Header Meaning
X-RateLimit-LimitMaximum requests allowed by the reported policy.
X-RateLimit-RemainingRequests remaining in the reported window. This is 0 when the request is rejected.
Retry-AfterNumber of seconds to wait before retrying. Treat this value as authoritative.
X-RateLimit-ResetUnix timestamp in seconds when the reported window resets.
X-RateLimit-ProfileEffective account profile. It may be absent for anonymous IP-scoped limits.
X-RateLimit-ScopePolicy scope: token, account, user, or ip.
X-RateLimit-WindowPolicy window: minute, hour, or day.

Responses with code rate_limited repeat these details as rate_limit_profile, rate_limit_scope, rate_limit_window, rate_limit_limit, and retry_after in the JSON body. Test-mode daily limits use code test_mode_limit_exceeded, include their account, user, and token limits, and include the same retry_after delay as the Retry-After header.

Retry uploads safely

Wait at least Retry-After seconds before retrying. Retry the same logical upload with the same Idempotency-Key, file, form fields, processing mode, and processing lane so a network retry cannot create duplicate processing or charges.