Response

A non-streaming response returns a chat.completion object:

Response
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1707436800,
  "model": "glm-4.7",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 9,
    "total_tokens": 33
  }
}

Response Fields

ParameterTypeRequiredDescription
idstringRequiredUnique identifier for the completion (format: "chatcmpl-...").
objectstringRequiredAlways "chat.completion".
createdintegerRequiredUnix timestamp of when the completion was created.
modelstringRequiredThe model that generated the completion.
choicesarrayRequiredList of completion choices. Typically contains one choice.
→messageobjectRequiredThe assistant's response message with role, content, and optional reasoning.
→message.reasoningstring | nullOptionalReasoning text emitted before final content for reasoning-capable models. Usually empty when reasoning is disabled.
→finish_reasonstringRequired"stop" (natural end), "length" (max_tokens reached), "tool_calls" (tool call requested), or "content_filter".
usageobjectRequiredToken usage statistics: prompt_tokens, completion_tokens, total_tokens.

Reasoning Response

OpenRouter-style responses can return both content and reasoning in the same completion object. If you only want final user output, ignore the reasoning field.

Response with reasoning
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1707436800,
  "model": "minimax-m2.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Here is the answer.",
        "reasoning": "First, I computed the pieces and confirmed..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 24,
    "total_tokens": 48
  }
}