LlamaExtract

Generate Extraction Schema

Changed on

Generates or refines an extraction agent's schema definition from a file, natural language prompt, or existing schema.

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

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

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