Retrieve Agent Response
GET
/
v1
/
agent
/
Retrieve Agent Response
curl --request GET \
--url https://api.perplexity.ai/v1/agent/{id} \
--header 'Authorization: Bearer <token>'{
"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": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>"
}
}Authorizations
Section titled “Authorizations”Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Section titled “Path Parameters”id
string
required
Response id (resp_<...>)
Response
Section titled “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)
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
Show child attributes
usage
ResponsesUsage · object
Token usage and cost information
Show child attributes
Was this page helpful?
⌘I