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

FieldTypeDescription
idstringUnique identifier for the response
objectstringAlways "response"
modelstringThe model used to generate the response
statusstring"completed", "in_progress", or "failed"
created_atintegerUnix timestamp of when the response was created
outputarrayArray of output items (messages)
output_textstringConvenience field with concatenated text output
usageobjectToken usage statistics
metadataobjectAdditional metadata including verification

#Usage Object

Token usage for billing and monitoring:

FieldTypeDescription
input_tokensintegerNumber of tokens in the input
output_tokensintegerNumber of tokens in the output
total_tokensintegerTotal 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}")