# Agent API

::::card-grid
:::card{title="Create Agent Response" href="/guides/agent-api-2-agent-post"}
Generate a response for the provided input with optional web search and reasoning.
:::

:::card{title="Retrieve Agent Response" href="/guides/agent-api-2-agent-get"}
Retrieve a response created earlier. Returns a JSON snapshot of the response. Only responses created with store omitted or true can be retrieved; store: false responses return a 404.
:::

:::card{title="List Agent Response Files" href="/guides/agent-api-2-agent-files-get"}
List the files a response produced in the sandbox and delivered with the share\_file tool. Scoped to the authenticated account, which only ever sees its own files. File content is not returned inline; download it with the file content endpoint.
:::

:::card{title="Download Agent Response File" href="/guides/agent-api-2-agent-file-content-get"}
Download the raw bytes of a file the response delivered with the share\_file tool. The file\_id comes from the file list endpoint and is distinct from the response id. The response streams raw bytes, not JSON, with a Content-Type matching the file and a Content-Disposition: attachment header carrying the original filename.
:::

:::card{title="Cancel Agent Response" href="/guides/agent-api-2-agent-cancel-post"}
Requests cancellation of response {id}. Acts on durable state, so it works for background runs that outlive the client connection. Cancellation is asynchronous: a 200 acknowledges the request (status: cancelling) and the run stops shortly after - poll GET /v1/agent/{id} for its terminal status. Cancelling a run that is already terminal returns 400. Ownership is enforced server side; a cross-tenant or unknown id surfaces as 404.
:::

:::card{title="List Models" href="/guides/agent-api-2-models-get"}
List the models available for the Agent API. Returns model identifiers that can be used with the POST /v1/agent endpoint. The response follows the OpenAI List Models format for compatibility with third-party tools.
:::

:::card{title="Search the Web" href="/guides/agent-api-2-search-post"}
Search the web and retrieve relevant web page contents.
:::
::::

## Related pages

- [Admin & Management](./admin-management-index.md)
- [Agent API](./agent-api-index.md)
- [Analytics API](./analytics-api-index.md)
- [Authentication](./authentication-index.md)
- [Changelog](../changelog.md)
- [Cookbook](./cookbook-2-index.md)
- [Embeddings API](./embeddings-api-2-index.md)
- [Embeddings API](./embeddings-api-index.md)
- [Getting Started](./getting-started-index.md)
- [More](./more-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
