Skip to navigation

Errors

Error responses, failed jobs, and retrying safely

Error responses

Every error response has the same shape:

{
"error": {
"code": "document_too_large",
"message": "documents[2].text exceeds 65536 bytes",
"request_id": "req_5d1c0a7e9f3b2a4c6e8d"
}
}

Branch on code, which is stable. message is for people and may change; it names the field at fault and never repeats your content. The request_id is also returned in the X-Request-Id header; quote it when contacting support.

HTTPcodeMeaning and what to do
400invalid_json, invalid_document, invalid_prompt, invalid_idempotency_keyThe request is malformed. The message names the field, e.g. documents[2].text
400ambiguous_documentsdocument was sent with other documents. Send it alone, or use documents
400invalid_documentAlso: every note in the FHIR bundles was unreadable and there is no structured record
400duplicate_document_idDocument ids must be unique across the job — including against the positions used for documents without an id
400unknown_document_idA document_metadata key matches no document
400unsupported_documentA prep_documents line has a PDF but no text
400invalid_fhir_bundleAn item of fhir_bundles is not a readable FHIR R4 Bundle. The message names fhir_bundles[i]
400invalid_nlp_resultAn nlp_results file is not emtellipro-json-2, or a document in it has no text or is malformed. The message names nlp_results[i].documents[j]
401invalid_credentialsThe key is missing, unknown, expired or revoked, or lacks the summarization:process scope
402organization_suspendedThe organization is suspended. See Billing
404not_foundNo such job for your organization, or it has expired
409idempotency_conflictThat Idempotency-Key was already used with a different body
409not_readyThe result was requested before the job finished
409no_resultThe job failed or was canceled, so there is no result
410result_expiredThe result was already downloaded
413document_too_large, prompt_too_large, documents_too_large, too_many_documents, payload_too_largeOver a limit
422request_validationA field has the wrong shape, or is not recognised. The message names the fields
429rate_limitedOver a rate or concurrency limit. Wait for the Retry-After seconds
500internal_errorAn unexpected problem on our side. Retry with backoff, and quote the request_id if it persists
503temporarily_unavailableRetry with backoff

Failed jobs

A job can fail after it was accepted. Its status is then failed, with a code:

{ "id": "job_8f2c1d0e9b7a6c5d4e3f2a1b", "status": "failed",
"error": { "code": "documents_too_long" }, … }
error.codeMeaning and what to do
insufficient_creditThe organization does not have enough credit for this job
document_too_long, documents_too_longToo much to summarize in one job. Send fewer or shorter documents
processing_timeoutThe job took too long. Resubmit; if it happens again, send fewer documents per job
processing_unavailable, processing_error, billing_unavailableA problem on our side. Resubmit, with the same Idempotency-Key; contact support with the job id if it persists

Failed jobs are not billed.

Retrying safely

Send an Idempotency-Key header (1–128 of A–Z a–z 0–9 _ . : -) with each submission. Retrying with the same key and the same body within 24 hours returns the original job, with 200, instead of creating — and billing — a second one. The same key with a different body is 409 idempotency_conflict.

Retry 429 after Retry-After, and 503 and network errors with exponential backoff. Do not retry 4xx other than 429 without changing the request.