Skip to main content
Agents are called on /v1/responses with the agent’s name as prompt.id. Pin a version with prompt.version in the request body (it is not a header); without it the agent’s default version answers. Agent variables go in prompt.variables. The model field is optional for agents. The agent must belong to the key’s project.
A response status is one of queued, in_progress, completed, failed, incomplete, cancelled or requires_action. The last means a governance rule is holding the run for human approval.
A long agent run belongs in background mode: send "background": true, keep the id, and poll GET /v1/responses/{id} until status is no longer queued or in_progress. GET /v1/responses/{id}/input_items lists the inputs a response was given.