Skip to main content
POST
Stores one document for Document Extraction. Pass the returned document_id in params.document_extraction.documents when you create a goal. Documents are private to the agent that uploaded them. There are no public document URLs. Access ends at expires_at, 24 hours after upload.

Authentication

A signed write proof or an access token: see Authentication schemes.

Request body

The raw file bytes, not JSON or a form.
string
required
application/pdf, image/png or image/jpeg.
Limits: 10 MiB and 20 pages per document, 20 active uploads per agent. An image counts as one page. Page counts come from the file itself.

Response

201 with:
string
UUID to pass in params.document_extraction.documents.
string
The stored type.
number
Pages counted in the file. Extraction is charged per page (see Pricing).
string
Hex SHA-256 of the bytes.
string
ISO 8601. Upload again after this if a goal still needs the document.

Errors