LlamaExtract

Generate Extraction Schema

Generate or refine an extraction agent schema from a file, natural-language prompt, or existing schema.

post/api/v1/extraction/extraction-agents/schema/generate

Query parameters

project_idstring uuid nullable
organization_idstring uuid nullable

Cookies

sessionstring nullable

Request body

promptstring nullable

Natural language description of the data structure to extract

file_idstring uuid nullable

Optional file ID to analyze for schema generation

Response

Successful Response

data_schemaobject required

The generated JSON schema

Changes

Changed in 1 of the 33 revisions of this API.2

    • added the optional property detail/items/ctx to the response with the 422 status

      response-optional-property-added

    • added the optional property detail/items/input to the response with the 422 status

      response-optional-property-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog