Document Information Extraction
Extract structured information from documents by uploading a base64-encoded file or providing a public URL.
Endpoint
-
Method: POST
-
Path: /document/extract
-
Content-Type: application/json
Header
-
Authorization: your API key (required)
-
Idempotency-Key: string (optional; recommended for safe retries)
Request
-
document_type: one of
organisation_doc,identity,proof_of_address
-
source: one of:
base64with payload (base64 string),urlwith url (publicly reachable URL)
Example (base64):
{
"document_type": "identity",
"source": "base64",
"payload": "BASE64_DATA_HERE"
}
Example (public URL):
{
"document_type": "organisation_doc",
"source": "url",
"url": "https://example.com/document.pdf"
}
Notes:
-
Only application/json is accepted.
-
Supported file types: PDF, JPEG, PNG.
Errors
All InfraRed error responses have this shape:
{
"error": {
"code": "string",
"message": "string",
"field": "string (optional)",
"livemode": false
}
}
The possible errors returned by this endpoint:
|
Code |
Description |
|---|---|
|
|
Document type does not match expected type. |
|
|
Base64 document payload is invalid. Includes |
|
|
Public URL of document is unreachable. Includes |
|
|
Unsupported document content type (only PDF, JPEG, PNG). |
|
|
Document size exceeds maximum (20 MB). |