Chat reply

A model’s whole answer to a chat call, with every step, the tools it used, and what it used.

A model’s whole answer to a chat call: the last answer, every step it took to get there, the tools it called and their results, why it stopped, and what it used in all.

{
  "id": "chatcmpl-b2",
  "model": "openai/gpt-oss-120b",
  "text": "Dar es Salaam is 31°C and sunny; Arusha is 22°C.",
  "reasoning": "",
  "json": undefined,
  "toolCalls": [
    { "id": "call_1", "name": "weather", "input": { "city": "Dar es Salaam" } },
    { "id": "call_2", "name": "weather", "input": { "city": "Arusha" } }
  ],
  "toolResults": [
    { "callId": "call_1", "name": "weather", "input": { "city": "Dar es Salaam" }, "output": { "tempC": 31 } },
    { "callId": "call_2", "name": "weather", "input": { "city": "Arusha" }, "output": { "tempC": 22 } }
  ],
  "stopReason": "end",
  "steps": [],
  "usage": { "inputTokens": 2000, "outputTokens": 900, "totalTokens": 2900, "units": 111 },
  "messages": [],
  "requestId": "01m3c081dbf3j55x7hsa7wc1yj",
  "processedIn": "Germany"
}

Fields

idstring

The last answer’s ID.

modelstring

The model that answered, by the name you sent.

textstring

The last answer’s text. Empty when the call ended because the model asked for tools.

reasoningstring

What a reasoning model thought before the last answer, kept apart from text. Empty when it did not reason.

jsonobject or undefined

With schema, the answer checked against it and typed. With json: true, the answer parsed. undefined otherwise, or when the call ended because the model asked for tools.

toolCallsToolCall[]

Every tool the model asked for, in every step, each { id, name, input }, with input checked against the tool’s schema. See Step.

toolResultsToolResult[]

What each tool that ran gave back, each { callId, name, input, output }, or error in place of output when it failed.

stopReasonstring

Why the last answer stopped: end when the model finished, max_tokens when it reached maxTokens, tool_calls when it asked for tools, or refused when it would not answer.

stepsStep[]

Each answer in order, with its text, reasoning, tool calls, results, and usage. See Step.

usageobject or null

What every step used together, or null when none was reported.

usage.inputTokensnumber

The tokens the model read.

usage.outputTokensnumber

The tokens the model wrote, reasoning included.

usage.totalTokensnumber

The two together.

usage.unitsnumber

The AI units the call used. See AI units.

messagesMessage[]

The messages this call added to the conversation: each answer, and a tool message for each result. Add them to your messages to carry on, such as after answering a tool with no run.

requestIdstring or undefined

The last answer’s ID with us. Quote it when you contact us. Each step has its own.

processedInstring or undefined

The country where the model ran, such as Germany or United States.

Returned by

Last updated