Skip to content

Custom Prompt

The custom prompt option allows you to provide custom instructions for AI-powered parsing. This option is only available for agentic tiers (cost_effective, agentic, and agentic_plus).

Use agentic_options.custom_prompt to configure this option.

Provide a custom prompt to guide the AI model during parsing:

{
"tier": "agentic",
"version": "latest",
"agentic_options": {
"custom_prompt": "Extract all financial data and format tables with currency symbols."
}
}
{
"tier": "agentic_plus",
"version": "latest",
"agentic_options": {
"custom_prompt": "This is a legal contract. Pay special attention to dates, parties involved, and monetary amounts."
}
}
{
"tier": "cost_effective",
"version": "latest",
"agentic_options": {
"custom_prompt": "Format all headings consistently and preserve the original document hierarchy."
}
}
Terminal window
curl -X 'POST' \
'https://api.cloud.llamaindex.ai/api/v2/parse' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
--data '{
"file_id": "<file_id>",
"tier": "agentic_plus",
"version": "latest",
"agentic_options": {
"custom_prompt": "Extract all tables and ensure numerical data is properly formatted."
}
}'

Note: This option is not available for the fast tier, which does not use AI models.