Skip to main content
POST
/
v1
/
ade
/
extract
cURL
curl -X POST 'https://api.va.landing.ai/v1/ade/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'schema={"type": "object", "properties": {"field1": {"type": "string"}, "field2": {"type": "string"}}, "required": ["field1", "field2"]}' \
  -F 'markdown=@markdown.md' \
  -F 'model=extract-latest'
{
  "extraction": {},
  "extraction_metadata": {},
  "metadata": {
    "filename": "<string>",
    "org_id": "<string>",
    "duration_ms": 123,
    "credit_usage": 123,
    "job_id": "<string>",
    "version": "<string>",
    "schema_violation_error": "<string>",
    "fallback_model_version": "<string>",
    "warnings": [
      {
        "code": "nonconformant_schema",
        "msg": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Your unique API key for authentication.

Get your API key here: https://va.landing.ai/settings/api-key.

If using the EU endpoint, get your API key here: https://va.eu-west-1.landing.ai/settings/api-key.

Body

multipart/form-data
schema
string
required

JSON schema for field extraction. This schema determines what key-values pairs are extracted from the Markdown. The schema must be a valid JSON object and will be validated before processing the document.

model
string | null

The version of the model to use for extraction. Use extract-latest to use the latest version.

markdown

The Markdown file or Markdown content to extract data from.

markdown_url
string | null

The URL to the Markdown file to extract data from.

strict
boolean
default:false

If True, reject schemas with unsupported fields (HTTP 422). If False, prune unsupported fields and continue. Only applies to extract versions that support schema validation.

Response

Successful Response

extraction
Extraction · object
required

The extracted key-value pairs.

extraction_metadata
Extraction Metadata · object
required

The extracted key-value pairs and the chunk_reference for each one.

metadata
ExtractMetadata · object
required

The metadata for the extraction process.