Skip to main content

Endpoint

Extract structured information from an uploaded document using a defined schema. Choose between Basic, VLM, or Advanced extraction modes based on your accuracy and speed requirements.

Authentication

string
required
API key for authentication. Your unique API key.

Path Parameters

string
required
UUID of the uploaded document. Obtained from the /upload endpoint.

Request Body

object
JSON Schema defining the structure of data to extract. Uses named_entities format. Optional, but strongly recommended for structured output.
string
Additional instructions for extraction. Optional but recommended for complex documents.Default: "No additional instructions provided."
string
For Basic Extraction only. Specify the AI model to use:
  • google-gemini-3-flash (6 credits/page) - Most accurate
  • google-gemini-2.5-flash (4 credits/page) - Balanced
  • qwen-3-vl (2 credits/page) - Fastest
If provided, uses Basic extraction mode (single model, no confidence scores).
string
For VLM Extraction only. Set to:
  • vlm (10 credits/page) - Vision-based extraction for scanned docs
For Advanced extraction (15 credits/page): Don’t set this parameter AND don’t set model.
For Basic extraction: Set model parameter instead.
number
default:"80"
Confidence threshold (0-100) for automatic review flagging. Only applies to Advanced/VLM modes.Fields with confidence below this threshold are flagged for review if they’re marked as required in the schema.
boolean
default:"false"
Enable citation/source matching for extracted fields. Only available in Advanced mode; don’t set model or extraction_mode when this is true.
boolean
default:"false"
Use the higher OCR tier for Advanced mode parsing. This is ignored by Basic and VLM extraction.
string
Additional instructions for confidence scoring in Advanced mode.

Response

string
UUID of the processed document.
object
Extracted data matching your schema structure. Fields are ordered according to schema definition.
boolean
Whether this extraction requires human review. true if any required fields have confidence below the review threshold.
object
Metadata about fields needing review. Only present in Advanced/VLM modes.

Examples

Basic Extraction

Fast, single-model extraction for simple documents:

Advanced Extraction

Multi-model validation with confidence scores:

Extraction Mode Comparison

Schema Guidelines

Field Types

Use for text data: names, addresses, identifiers.
For numeric values: amounts, quantities, percentages.
For repeating data: tables, lists, multiple entries.
For structured data groups.

Best Practices

  1. Descriptive Field Names: Use clear, meaningful names (invoice_date not date1)
  2. Detailed Descriptions: Help the AI understand context and format
  3. Mark Critical Fields: Add to required array for automatic review
  4. Consistent Naming: Use snake_case throughout your schema

Error Responses

402 Payment Required

Check your credit balance before processing large batches.

403 Forbidden

Document belongs to another user or organization.

500 Internal Server Error

Extraction processing failed. Retry or contact support if it persists.

Next Steps

Review Workflow

Handle documents that need review

Polling Pattern

Implement review polling for automation

List Extractions

Query extraction results