v50

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-011235801.3 MB
Public API

Create Run With Generated Agent

Creates a minimal persistent Web Search Agent and starts a run for it. The response includes web_search_agent_id for later agent and run queries.

post/v2/agents/runs

Request body

agent_namestring nullable

Stable agent name. On this no-agent-id route, an unseen name creates a new agent; an existing name reuses it. Ignored on the /{agent_id}/runs route.

effort'low' | 'medium' | 'high' | 'x-high' | 'max'

Canonical effort tier names for the research graph.

enable_eventsboolean

Whether to stream run events when supported.

inputstring required

User prompt or task instructions for the run.

origin'api'

Origin of public API runs. Public requests are always API-originated.

output_schemaobject nullable

JSON schema overriding the agent's default structured output for this run.

previous_interaction_idstring nullable

Previous interaction identifier used to continue a conversation.

skillstring nullable

Skill override for this run. One-time only, except when this run creates a new agent via agent_name, in which case it becomes the new agent's stored skill.

use_case'research' | 'enrichment' | 'dataset_building'

Response

Successful Response

completed_atstring date-time nullable

When the run completed.

created_atstring date-time required

When the run was created.

effort'low' | 'medium' | 'high' | 'x-high' | 'max' required

Canonical effort tier names for the research graph.

idstring required

Run identifier, format "task_run_{uuid}".

interaction_idstring required

Interaction ID.

is_activeboolean required

True while status is 'queued' or 'running'.

promptstring nullable

Prompt submitted for the run.

started_atstring date-time nullable

When the run started executing.

status'queued' | 'running' | 'completed' | 'failed' | 'cancelled' required

Lowercase status values used in API responses (distinct from the DB-level TaskRunStatus enum).

web_search_agent_idstring required

Web Search Agent instance this run belongs to.