Stores one item of a job from a multipart upload. A batch's items arrive
one per request. The item carries either a document extraction
(whose input file rides as raw bytes in the file part) or a
create extraction (JSON only, no file).
The upload enforces these rules:
- Set exactly one of
documentorcreate. Setting both, or
neither, is a400. - When
documentis set,fileis required — it supplies the
document's binary content (PDF or image). - When
createis set,fileis forbidden — a create item carries
no file. documentandcreatemust each be a JSON object.
Only the item's structure is checked here: the fields inside document
or create are not validated at upload. A body that is well-formed JSON
but not a valid request for its endpoint is still accepted with 202
and fails later during processing, recorded as an item error. A
wrong-typed field the endpoint cannot decode fails as invalid_input; a
body that decodes but the pipeline rejects (for example, a missing
required field) fails as processing_failed.
Supplying request_id makes the upload idempotent on that token. A
re-upload under the same token overwrites the same item rather than
adding a second, so a client that lost an upload's response can safely
re-send it. The response's deduplicated is true only when the
re-uploaded payload matches the one already stored; a same-token upload
with a changed payload overwrites in place and returns false.
Set a request_id on every upload: re-sending under the same token
is the only way to repair a lost or incomplete upload, including the one
a finalize 409 reports. Without one, a re-send adds a new item instead
of replacing the missing one, and the job cannot be finalized.
Uploads are rejected once the job has been finalized (409), once it
holds its 500-item limit (409), or when the item is too large (413 —
see the raw-file limit in the API description).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Invalid upload — e.g. both or neither of document/create set, a
non-object document/create, a document item missing its file, a
create item carrying a file, or an over-length request_id/id.
401Unauthorized
404Batch job not found
409The job is finalized (no longer accepting items) or holds its 500-item limit
413The upload is too large. Both size trips return 413: the request body
exceeding the 32 MiB upload cap, and the item's stored payload
exceeding the 28 MiB per-item limit (~21 MiB of raw file once
base64-encoded).
499Client closed request before response was ready
500Server error
504Request timed out
