# Retrieve Agent Response

GET

/

v1

/

agent

/

Retrieve Agent Response

```
curl --request GET \
  --url https://api.perplexity.ai/v1/agent/{id} \
  --header 'Authorization: Bearer <token>'
```

:::code-group
```title="200"
{
  "created_at": 123,
  "id": "<string>",
  "model": "<string>",
  "object": "response",
  "output": [
    {
      "content": [
        {
          "text": "<string>",
          "type": "output_text",
          "annotations": [
            {
              "end_index": 123,
              "start_index": 123,
              "title": "<string>",
              "type": "<string>",
              "url": "<string>"
            }
          ]
        }
      ],
      "id": "<string>",
      "role": "assistant",
      "status": "completed",
      "type": "message"
    }
  ],
  "status": "completed",
  "error": {
    "message": "<string>",
    "code": "<string>",
    "type": "<string>"
  },
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123,
    "total_tokens": 123,
    "cost": {
      "currency": "USD",
      "input_cost": 123,
      "output_cost": 123,
      "total_cost": 123,
      "cache_creation_cost": 123,
      "cache_read_cost": 123,
      "tool_calls_cost": 123
    },
    "input_tokens_details": {
      "cache_creation_input_tokens": 123,
      "cache_read_input_tokens": 123
    },
    "tool_calls_details": {}
  }
}
```

```title="404"
{
  "error": {
    "message": "<string>",
    "code": "<string>",
    "type": "<string>"
  }
}
```
:::

#### Authorizations

Authorization

string

header

required

Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.

#### Path Parameters

id

string

required

Response id (`resp_<...>`)

#### Response

JSON snapshot of the response.

Non-streaming response returned when stream is false

created\_at

integer\<int64>

required

Unix timestamp when the response was created

id

string

required

Unique identifier for the response

model

string

required

Model used for generation

object

enum\<string>

required

Object type identifier

Available options:

`response`

output

(MessageOutputItem · object | SearchResultsOutputItem · object | FetchUrlResultsOutputItem · object | FinanceResultsOutputItem · object | PeopleSearchResultsOutputItem · object | FunctionCallOutputItem · object | SandboxResultsOutputItem · object | McpListToolsOutputItem · object | McpCallOutputItem · object | ToolSearchOutputItem · object)\[]

required

Array of output items (messages, search results, tool calls)

::::tabs
:::tab{title="MessageOutputItem"}
:::

:::tab{title="SearchResultsOutputItem"}
:::

:::tab{title="FetchUrlResultsOutputItem"}
:::

:::tab{title="FinanceResultsOutputItem"}
:::

:::tab{title="PeopleSearchResultsOutputItem"}
:::

:::tab{title="FunctionCallOutputItem"}
:::

:::tab{title="SandboxResultsOutputItem"}
:::

:::tab{title="McpListToolsOutputItem"}
:::

:::tab{title="McpCallOutputItem"}
:::

:::tab{title="ToolSearchOutputItem"}
:::
::::

:::accordion{title="Show child attributes"}
:::

status

enum\<string>

required

Status of the response

Available options:

`completed`,

`failed`,

`incomplete`,

`in_progress`,

`queued`,

`cancelled`

error

ErrorInfo · object

Error details if the response failed

:::accordion{title="Show child attributes"}
:::

usage

ResponsesUsage · object

Token usage and cost information

:::accordion{title="Show child attributes"}
:::

Was this page helpful?

⌘I

## Related pages

- [Admin & Management](./admin-management-index.md)
- [Agent API](./agent-api-2-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)

# 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.
