Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Retrieves the current state of an agent response by task ID. Returns the response output, model information, token usage, and execution status. When the agent is still processing, the output array will be empty and status will be in_progress. Once completed, the response includes the full output, usage statistics, and finish reason.
curl --request GET \
--url https://api.orq.ai/v2/agents/{agent_key}/responses/{task_id} \
--header 'Authorization: Bearer <token>'{
"_id": "<string>",
"task_id": "<string>",
"output": [
{
"messageId": "<string>",
"role": "user",
"parts": [
{
"kind": "text",
"text": "<string>"
}
],
"metadata": {}
}
],
"created_at": "<string>",
"model": "<string>",
"status": "in_progress",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_creation_tokens": 123,
"audio_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123,
"audio_tokens": 123
}
},
"finish_reason": "stop",
"pending_tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"telemetry": {
"trace_id": "<string>",
"span_id": "<string>"
},
"error": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique key identifier of the agent
The agent execution task ID returned from create response
Response retrieved successfully. Returns the current state of the agent execution including output messages, model used, token usage, and status.
Response type from the get-response endpoint. Includes a status field indicating the current state of the agent execution.
The unique response ID
The agent execution task ID
Array of messages from the agent execution
Show child attributes
ISO timestamp of response creation
Model used in provider/model format
Current status of the agent response
in_progress, completed, failed Token usage from the agent execution
Show child attributes
The reason why the agent stopped generating
stop, length, tool_calls, content_filter, function_call, max_iterations, max_time Tool calls awaiting user response (when finish_reason is function_call)
Show child attributes
Telemetry information for correlating the response with traces
Show child attributes
Error message when status is failed
Was this page helpful?
curl --request GET \
--url https://api.orq.ai/v2/agents/{agent_key}/responses/{task_id} \
--header 'Authorization: Bearer <token>'{
"_id": "<string>",
"task_id": "<string>",
"output": [
{
"messageId": "<string>",
"role": "user",
"parts": [
{
"kind": "text",
"text": "<string>"
}
],
"metadata": {}
}
],
"created_at": "<string>",
"model": "<string>",
"status": "in_progress",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_creation_tokens": 123,
"audio_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123,
"audio_tokens": 123
}
},
"finish_reason": "stop",
"pending_tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"telemetry": {
"trace_id": "<string>",
"span_id": "<string>"
},
"error": "<string>"
}