Skip to main content
POST
/
v1
/
ade
/
extract
/
build-schema
cURL
curl -X POST 'https://api.va.landing.ai/v1/ade/extract/build-schema' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'markdowns=@markdown.md' \
  -F 'model=extract-latest' \
  -F 'prompt=Extract invoice fields including vendor, date, and total amount'
{
  "extraction_schema": "<string>",
  "metadata": {
    "filename": "<string>",
    "org_id": "<string>",
    "duration_ms": 0,
    "credit_usage": 0,
    "job_id": "",
    "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
model
string | null

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

markdowns
(file | string)[] | null

Markdown files or inline content strings to analyze for schema generation. Multiple documents can be provided for better schema coverage.

markdown_urls
string[] | null

URLs to Markdown files to analyze for schema generation.

prompt
string | null

Instructions for how to generate or modify the schema.

schema
string | null

Existing JSON schema to iterate on or refine.

Response

Successful Response

extraction_schema
string
required

The generated JSON schema as a string.

metadata
BuildSchemaMetadata · object
required

The metadata for the schema generation process.