v34

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-09194386949.7 KB
V2
Extract

Generate Extraction Schema

Generate a JSON schema and return a product configuration request.

post/api/v2/extract/schema/generate

Query parameters

project_idstring uuid nullable
organization_idstring uuid nullable

Cookies

sessionstring nullable

Request body

namestring nullable

Name for the generated configuration (auto-generated if omitted)

promptstring nullable

Natural language description of the data structure to extract

file_idstring nullable

Optional file ID to analyze for schema generation

data_schemaobject nullable

Optional schema to validate, refine, or extend

Example request

{
  "name": "invoice_extraction",
  "prompt": "Extract vendor name, invoice number, date, line items with descriptions and amounts, and total amount from invoices."
}

Response

Successful Response

namestring required

Human-readable name for this configuration.

Example response

{
  "parameters": {
    "target_pages": "1,3,5-7",
    "max_pages": 10,
    "tier": "cost_effective",
    "version": "latest",
    "extraction_target": "per_doc",
    "system_prompt": "Extract all monetary values in USD. If a currency is not specified, assume USD.",
    "parse_tier": "fast",
    "parse_config_id": "cfg-11111111-2222-3333-4444-555555555555"
  }
}