Create Document Intelligence
Extract structured data from documents using AI-powered document intelligence.
Request Body
id field (reference existing) OR the data field (upload new).fields or template must be provided — not both.template.fields.fast or advanced. It sets both the model used and the credit cost per
page — fast costs 3 credits per page, advanced costs 6. Defaults to advanced.Only valid together with fields. When you use a template, the level configured on that template
applies instead, and sending level alongside template is rejected.results field once processing is complete.hint field to help the AI extract the field. For example, if the field is a date, you
can use the hint field to specify the format of the date. For example: “DD/MM/YYYY”.Authorizations
API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}
Body
- Option 1
- Option 2
Exactly one of 'fields' or 'template' must be provided.
Fields to extract. Mutually exclusive with 'template'.
Array of attachments to process (minimum 1). Each attachment must have either 'id' (reference to existing attachment) OR 'data' (new file upload with base64). When using 'data', 'name' and 'type' are required.
1New file upload with base64-encoded data
- Option 1
- Option 2
Reference to a document intelligence template. Mutually exclusive with 'fields'.
Optional language hint for document processing
Extraction quality level, which sets both the model used and the credit cost per page: 'fast' costs 3 credits per page, 'advanced' costs 6. Defaults to 'advanced'. Only valid together with 'fields' — when 'template' is used the level configured on that template applies, and sending this field alongside 'template' is rejected.
fast, advanced Response
Document intelligence job created
Document intelligence job UUID
Job creation timestamp
Array of processed documents
Extraction results: the extracted fields, a validation assessment, and the detected document type.
Last update timestamp
Document language detected or specified
The quality level this extraction ran at, and therefore the rate it was billed at per page ('fast' 3 credits per page, 'advanced' 6). Null for extractions created before levels existed.
fast, advanced User who created the job
Token usage statistics for the AI processing