Docs/API Reference/Response Format
Response Format
The response follows the OpenAI Responses API format with additional metadata for verification results.
#Response Object
A complete response object with all fields:
JSON Response
{
"id": "resp_abc123",
"object": "response",
"model": "alphagent-smart",
"status": "completed",
"created_at": 1736360000,
"output": [
{
"id": "msg_1",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "AAPL is trading at $187.12.",
"annotations": []
}
]
}
],
"output_text": "AAPL is trading at $187.12.",
"usage": {
"input_tokens": 18,
"output_tokens": 26,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 44
},
"metadata": {
"mode": "multi_agent",
"verification": {
"verified_claims": ["AAPL price of $187.12 confirmed"],
"flagged_claims": [],
"confidence": "high"
}
}
}#Top-Level Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the response |
| object | string | Always "response" |
| model | string | The model used to generate the response |
| status | string | "completed", "in_progress", or "failed" |
| created_at | integer | Unix timestamp of when the response was created |
| output | array | Array of output items (messages) |
| output_text | string | Convenience field with concatenated text output |
| usage | object | Token usage statistics |
| metadata | object | Additional metadata including verification |
#Usage Object
Token usage for billing and monitoring:
| Field | Type | Description |
|---|---|---|
| input_tokens | integer | Number of tokens in the input |
| output_tokens | integer | Number of tokens in the output |
| total_tokens | integer | Total tokens (input + output) |
#Accessing the Response
Use output_text for quick access to the response text:
Python
response = client.responses.create( model="alphagent-smart", input="What is AAPL trading at?" ) # Quick access to text print(response.output_text) # Access full output structure for item in response.output: if item.type == "message": for content in item.content: print(content.text) # Access usage print(f"Tokens used: {response.usage.total_tokens}")