Skip to main content
Perplexity

Search documentation

Type to search this documentation.

Agent API

Create Agent Response

Generate a response for the provided input with optional web search and reasoning.

Retrieve Agent Response

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.

List Agent Response Files

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.

Download Agent Response File

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.

Cancel Agent Response

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.

List Models

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.

Search the Web

Search the web and retrieve relevant web page contents.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu