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": [
{
"msg": "<string>"
}
]
}
}ADE Build Extract Schema
Generate a JSON schema from Markdown using AI.
This endpoint analyzes Markdown content and generates a JSON schema suitable for use with the extract endpoint. It can also refine an existing schema based on new documents or iterate on a schema based on prompt instructions.
For EU users, use this endpoint:
https://api.va.eu-west-1.landing.ai/v1/ade/extract/build-schema.
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": [
{
"msg": "<string>"
}
]
}
}Authorizations
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
The version of the model to use for schema generation. Use extract-latest to use the latest version.
Markdown files or inline content strings to analyze for schema generation. Multiple documents can be provided for better schema coverage.
URLs to Markdown files to analyze for schema generation.
Instructions for how to generate or modify the schema.
Existing JSON schema to iterate on or refine.
Was this page helpful?