Skip to content

Extraction Agents

List Extract Agents
client.ExtractionAgents.List(ctx, query) (*PaginatedCursor[ExtractAgent], error)
GET/api/v1/beta/extraction-agents
ModelsExpand Collapse
type ExtractAgent struct{…}

Schema and configuration for an extraction agent.

ID string

The id of the extraction agent.

formatuuid
Config ExtractAgentConfig

The configuration parameters for the extraction agent.

ChunkMode stringOptional

The mode to use for chunking the document.

One of the following:
const ExtractAgentConfigChunkModePage ExtractAgentConfigChunkMode = "PAGE"
const ExtractAgentConfigChunkModeSection ExtractAgentConfigChunkMode = "SECTION"
DeprecatedCitationBbox boolOptional

Whether to fetch citation bounding boxes for the extraction. Only available in PREMIUM mode. Deprecated: this is now synonymous with cite_sources.

CiteSources boolOptional

Whether to cite sources for the extraction.

ConfidenceScores boolOptional

Whether to fetch confidence scores for the extraction.

ExtractModel stringOptional

The extract model to use for data extraction. If not provided, uses the default for the extraction mode.

One of the following:
string
One of the following:
const ExtractAgentConfigExtractModelGemini2_0Flash ExtractAgentConfigExtractModel = "gemini-2.0-flash"
const ExtractAgentConfigExtractModelGemini2_5Flash ExtractAgentConfigExtractModel = "gemini-2.5-flash"
const ExtractAgentConfigExtractModelGemini2_5FlashLite ExtractAgentConfigExtractModel = "gemini-2.5-flash-lite"
const ExtractAgentConfigExtractModelGemini2_5Pro ExtractAgentConfigExtractModel = "gemini-2.5-pro"
const ExtractAgentConfigExtractModelOpenAIGpt4_1 ExtractAgentConfigExtractModel = "openai-gpt-4-1"
const ExtractAgentConfigExtractModelOpenAIGpt4_1Mini ExtractAgentConfigExtractModel = "openai-gpt-4-1-mini"
const ExtractAgentConfigExtractModelOpenAIGpt4_1Nano ExtractAgentConfigExtractModel = "openai-gpt-4-1-nano"
const ExtractAgentConfigExtractModelOpenAIGpt4o ExtractAgentConfigExtractModel = "openai-gpt-4o"
const ExtractAgentConfigExtractModelOpenAIGpt4oMini ExtractAgentConfigExtractModel = "openai-gpt-4o-mini"
const ExtractAgentConfigExtractModelOpenAIGpt5 ExtractAgentConfigExtractModel = "openai-gpt-5"
const ExtractAgentConfigExtractModelOpenAIGpt5Mini ExtractAgentConfigExtractModel = "openai-gpt-5-mini"
string
ExtractionMode stringOptional

The extraction mode specified (FAST, BALANCED, MULTIMODAL, PREMIUM).

One of the following:
const ExtractAgentConfigExtractionModeBalanced ExtractAgentConfigExtractionMode = "BALANCED"
const ExtractAgentConfigExtractionModeFast ExtractAgentConfigExtractionMode = "FAST"
const ExtractAgentConfigExtractionModeMultimodal ExtractAgentConfigExtractionMode = "MULTIMODAL"
const ExtractAgentConfigExtractionModePremium ExtractAgentConfigExtractionMode = "PREMIUM"
ExtractionTarget stringOptional

The extraction target specified.

One of the following:
const ExtractAgentConfigExtractionTargetPerDoc ExtractAgentConfigExtractionTarget = "PER_DOC"
const ExtractAgentConfigExtractionTargetPerPage ExtractAgentConfigExtractionTarget = "PER_PAGE"
const ExtractAgentConfigExtractionTargetPerTableRow ExtractAgentConfigExtractionTarget = "PER_TABLE_ROW"
HighResolutionMode boolOptional

Whether to use high resolution mode for the extraction.

InvalidateCache boolOptional

Whether to invalidate the cache for the extraction.

MultimodalFastMode boolOptional

DEPRECATED: Whether to use fast mode for multimodal extraction.

NumPagesContext int64Optional

Number of pages to pass as context on long document extraction.

minimum1
PageRange stringOptional

Comma-separated list of page numbers or ranges to extract from (1-based, e.g., ‘1,3,5-7,9’ or ‘1-3,8-10’).

ParseModel stringOptional

Public model names.

One of the following:
const ExtractAgentConfigParseModelAnthropicHaiku3_5 ExtractAgentConfigParseModel = "anthropic-haiku-3.5"
const ExtractAgentConfigParseModelAnthropicHaiku4_5 ExtractAgentConfigParseModel = "anthropic-haiku-4.5"
const ExtractAgentConfigParseModelAnthropicSonnet3_5 ExtractAgentConfigParseModel = "anthropic-sonnet-3.5"
const ExtractAgentConfigParseModelAnthropicSonnet3_5V2 ExtractAgentConfigParseModel = "anthropic-sonnet-3.5-v2"
const ExtractAgentConfigParseModelAnthropicSonnet3_7 ExtractAgentConfigParseModel = "anthropic-sonnet-3.7"
const ExtractAgentConfigParseModelAnthropicSonnet4_0 ExtractAgentConfigParseModel = "anthropic-sonnet-4.0"
const ExtractAgentConfigParseModelAnthropicSonnet4_5 ExtractAgentConfigParseModel = "anthropic-sonnet-4.5"
const ExtractAgentConfigParseModelGemini2_0Flash ExtractAgentConfigParseModel = "gemini-2.0-flash"
const ExtractAgentConfigParseModelGemini2_0FlashLite ExtractAgentConfigParseModel = "gemini-2.0-flash-lite"
const ExtractAgentConfigParseModelGemini2_5Flash ExtractAgentConfigParseModel = "gemini-2.5-flash"
const ExtractAgentConfigParseModelGemini2_5FlashLite ExtractAgentConfigParseModel = "gemini-2.5-flash-lite"
const ExtractAgentConfigParseModelGemini2_5Pro ExtractAgentConfigParseModel = "gemini-2.5-pro"
const ExtractAgentConfigParseModelGemini3_0Pro ExtractAgentConfigParseModel = "gemini-3.0-pro"
const ExtractAgentConfigParseModelGemini3_1Pro ExtractAgentConfigParseModel = "gemini-3.1-pro"
const ExtractAgentConfigParseModelOpenAIGpt4_1 ExtractAgentConfigParseModel = "openai-gpt-4-1"
const ExtractAgentConfigParseModelOpenAIGpt4_1Mini ExtractAgentConfigParseModel = "openai-gpt-4-1-mini"
const ExtractAgentConfigParseModelOpenAIGpt4_1Nano ExtractAgentConfigParseModel = "openai-gpt-4-1-nano"
const ExtractAgentConfigParseModelOpenAIGpt4o ExtractAgentConfigParseModel = "openai-gpt-4o"
const ExtractAgentConfigParseModelOpenAIGpt4oMini ExtractAgentConfigParseModel = "openai-gpt-4o-mini"
const ExtractAgentConfigParseModelOpenAIGpt5 ExtractAgentConfigParseModel = "openai-gpt-5"
const ExtractAgentConfigParseModelOpenAIGpt5Mini ExtractAgentConfigParseModel = "openai-gpt-5-mini"
const ExtractAgentConfigParseModelOpenAIGpt5Nano ExtractAgentConfigParseModel = "openai-gpt-5-nano"
const ExtractAgentConfigParseModelOpenAITextEmbedding3Large ExtractAgentConfigParseModel = "openai-text-embedding-3-large"
const ExtractAgentConfigParseModelOpenAITextEmbedding3Small ExtractAgentConfigParseModel = "openai-text-embedding-3-small"
const ExtractAgentConfigParseModelOpenAIWhisper1 ExtractAgentConfigParseModel = "openai-whisper-1"
Priority stringOptional

The priority for the request. This field may be ignored or overwritten depending on the organization tier.

One of the following:
const ExtractAgentConfigPriorityCritical ExtractAgentConfigPriority = "critical"
const ExtractAgentConfigPriorityHigh ExtractAgentConfigPriority = "high"
const ExtractAgentConfigPriorityLow ExtractAgentConfigPriority = "low"
const ExtractAgentConfigPriorityMedium ExtractAgentConfigPriority = "medium"
SystemPrompt stringOptional

The system prompt to use for the extraction.

UseReasoning boolOptional

Whether to use reasoning for the extraction.

DataSchema map[string, *ExtractAgentDataSchemaUnion]

The schema of the data.

One of the following:
type ExtractAgentDataSchemaMap map[string, any]
type ExtractAgentDataSchemaArray []any
string
float64
bool
Name string

The name of the extraction agent.

ProjectID string

The ID of the project that the extraction agent belongs to.

formatuuid
CreatedAt TimeOptional

The creation time of the extraction agent.

formatdate-time
CustomConfiguration ExtractAgentCustomConfigurationOptional

Custom configuration type for the extraction agent. Currently supports ‘default’.

UpdatedAt TimeOptional

The last update time of the extraction agent.

formatdate-time
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/