Create a run
Create an asynchronous Agent run. The response returns the run object immediately unless you request server-sent events.
Create a run with a natural-languageDocumentation Index
Fetch the complete documentation index at: https://exa.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
query. Add outputSchema for validated structured JSON, input.data for rows to process, input.exclusion for records or entities to avoid, or previousRunId to continue from a completed run.
Set Accept: text/event-stream to stream run events as the run is created, started, and completed.
Get your Exa API key
Authorizations
Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .
Headers
Required beta token for the Agent.
agent-2026-05-07 Set to text/event-stream to receive server-sent events.
application/json, text/event-stream Body
Natural-language question or instructions for the request.
1"What are the most important AI infrastructure funding rounds announced this week?"
Additional instructions that guide generated output or agent behavior. Use this for source preferences, novelty constraints, duplication constraints, or other behavior guidance.
"Prefer official sources and avoid duplicate results."
Records to process and records or entities to exclude from the answer.
JSON Schema for validated structured output in output.structured. Supports draft-07, 2019-09, and 2020-12 via $schema.
Cost and reasoning effort preference for the run. auto lets Exa choose the appropriate effort.
low, medium, high, xhigh, auto Completed run ID to continue from. Must belong to the same team.
1 - 200^[A-Za-z0-9_.:-]+$"agent_run_01j7x9v0m2n4p6q8r0s2t4v6w8"
Caller-provided metadata stored with the run.
{
"slack_channel_id": "C123ABC",
"slack_thread_id": "1745444400.123456",
"user_id": "U123ABC"
}Accepted for compatibility and currently ignored.
Response
Agent run created
Agent run ID. New run IDs are returned with the agent_run_ prefix.
1 - 200^[A-Za-z0-9_.:-]+$"agent_run_01j7x9v0m2n4p6q8r0s2t4v6w8"
"agent_run"queued, running, completed, failed, cancelled Why the run stopped. null while the run is queued or running.
schema_satisfied, budget_reached, error, cancelled When the run was created
Canonicalized request fields stored with the run.

