Sample - OpenAI API
GET/agents/{agent_id}

Retrieve an agent

Retrieves a reusable agent by ID. See agent configuration.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
agent_idstringrequired
The ID of the reusable agent.

7 status codes
200The requested agent.
idstringrequired
The ID of the reusable agent.
objectstringrequired
The object type. Always `agent`.
Allowed:agentDefault:agent
created_atintegerrequired
The Unix timestamp, in seconds, when the agent was created.
updated_atintegerrequired
The Unix timestamp, in seconds, when the agent was last updated.
namestringrequired
A human-readable name for the agent, or null if it is unnamed.
metadataobjectrequired
Custom string key-value pairs attached to the agent.
modelstringrequired
The requested model name used for inference.
reasoningobjectrequired
The resolved reasoning configuration, including the model default for an omitted effort.
textobjectrequired
The resolved configuration for text generated by the agent.
service_tierstringrequired
The resolved service-tier policy used for model requests.
Allowed:autodefaultflexpriorityfast
instructionsstringrequired
Custom instructions appended to the agent's default base instructions.
toolsarray<object>required
Tools available to the agent.
multi_agentobjectrequired
The resolved configuration for creating and coordinating subagents.
400The request was invalid.
errorobjectrequired
The error returned by the API.
401Authentication or project context was missing.
errorobjectrequired
The error returned by the API.
404The requested session or event was not found.
errorobjectrequired
The error returned by the API.
409The request conflicted with the current session state.
errorobjectrequired
The error returned by the API.
500An internal error occurred.
errorobjectrequired
The error returned by the API.
503The service is temporarily unavailable.
errorobjectrequired
The error returned by the API.

Error handling

A 400 is returned: The request was invalid. A 401 is returned: Authentication or project context was missing. A 404 is returned: The requested session or event was not found. A 409 is returned: The request conflicted with the current session state. A 500 is returned: An internal error occurred. A 503 is returned: The service is temporarily unavailable.