# Retrieve Agent Response

**GET** `/v1/agent/{id}`

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.

Base URL: `https://api.perplexity.ai`

## Authorization

| Option | Scheme | Type | Sent as | Scopes |
| --- | --- | --- | --- | --- |
| Option 1 | `HTTPBearer` | `http` | `Authorization: Bearer <token>` | — |

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Response id (`resp_<...>`) |

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | JSON snapshot of the response. | `application/json` |
| `404` | Unknown id, or the response belongs to a different account, or the response was created with `store: false`. | `application/json` |

### Example response: 200 — JSON snapshot of the response.

```json
{
  "created_at": 0,
  "error": {
    "code": "string",
    "message": "string",
    "type": "string"
  },
  "id": "string",
  "model": "string",
  "object": "response",
  "output": [
    {
      "contents": [
        {
          "snippet": "string",
          "title": "string",
          "url": "string"
        }
      ],
      "type": "fetch_url_results"
    }
  ],
  "status": "cancelled",
  "usage": {
    "cost": {
      "cache_creation_cost": 0,
      "cache_read_cost": 0,
      "currency": "USD",
      "input_cost": 0,
      "output_cost": 0,
      "tool_calls_cost": 0,
      "total_cost": 0
    },
    "input_tokens": 0,
    "input_tokens_details": {
      "cache_creation_input_tokens": 0,
      "cache_read_input_tokens": 0
    },
    "output_tokens": 0,
    "tool_calls_details": {
      "additionalProp1": {
        "invocation": 0
      }
    },
    "total_tokens": 0
  }
}
```

### Example response: 404 — Unknown id, or the response belongs to a different account, or the response was created with `store: false`.

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "string"
  }
}
```

## Related pages

- [Add a skill revision](./updateskill.md)
- [Cancel Agent Response](./cancelagentresponse.md)
- [Create a skill](./createskill.md)
- [Create Agent Response](./createagent.md)
- [Create Async Chat Completion](./create_async_chat_completions_async_chat_completions_post.md)
- [Create Chat Completion](./chat_completions_chat_completions_post.md)
- [Create Contextualized Embeddings](./contextualized_embeddings_v1_contextualizedembeddings_post.md)
- [Create Embeddings](./embeddings_v1_embeddings_post.md)
- [Delete a skill](./deleteskill.md)
- [Download Agent Response File](./downloadagentfile.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.
