UntangledAPI

Errors

HTTP status codes Untangled returns and what each one means.

Every error response is JSON in the same shape:

{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is missing, malformed, or has been revoked.",
    "details": {
      "requestId": "req_01HXXXX"
    }
  }
}

If a response includes error.details.requestId, attach that value when filing a support ticket. We can locate any request by it.

Status codes

Statuserror.codeWhen
400invalid_requestBody failed JSON parse or schema validation.
400document_too_largeThe submitted document exceeded the per-call size cap. Split or use /v1/extract/batch.
401invalid_api_keyMissing, malformed, or revoked x-api-key.
402plan_limit_exceededFree plan hit the HEU bucket; paid plans only see this if billing is past-due.
404not_foundThe path or resource (batch ID, schema slug) doesn't exist.
409idempotency_conflictSame Idempotency-Key reused on a different request body.
422extract_failedThe document parsed but no schema-conformant data could be produced.
429too_many_requestsPlan concurrency cap or per-IP rate limit. Retry after the Retry-After header.
500internal_errorUntangled's fault. Retries with the same Idempotency-Key are safe.
503service_unavailableUpstream model temporarily down. Retry with backoff.

Retry policy

  • 429 and 5xx are retryable. Use exponential backoff starting at 1s, max 30s.
  • 4xx other than 429 are not retryable — the request body needs to change.
  • Idempotency keys make retries safe — pass Idempotency-Key: <uuid> and a duplicate within 5 minutes returns the original response without re-charging HEU.

Clock-skew note

429 responses include a Retry-After header in seconds. Use that exact value. Do not derive a retry time from local clock arithmetic — the server clock is the source of truth.

On this page