Task reply

A task’s whole answer, with the tokens and AI units it used.

A task’s whole answer, from run(), with why it stopped and what it used.

{
  "task": "summarise-note",
  "model": "openai/gpt-oss-20b",
  "text": "Kivuko kwenda Zanzibar kinaondoka saa moja asubuhi.",
  "stopReason": "end",
  "usage": { "inputTokens": 58, "outputTokens": 14, "units": 12 },
  "requestId": "01m3c081dbf3j55x7hsa7wc1yj",
  "processedIn": "Germany"
}

Fields

taskstring

The task that ran.

modelstring

The model the task uses.

textstring

The answer. A reasoning model’s reasoning is left out.

jsonunknown

For a task with JSON answers, the answer parsed as JSON, matching the task’s schema. undefined for other tasks.

stopReasonstring

Why the model stopped: end when it finished, max_tokens when it reached the task’s limit, or refused when it would not answer.

usage.inputTokensnumber

The tokens the model read.

usage.outputTokensnumber

The tokens the model wrote.

usage.unitsnumber

The AI units the run used. See AI units.

requestIdstring or undefined

The request’s ID, for support.

processedInstring or undefined

The country the model ran in, such as Germany.

json is unknown because a model can answer any JSON. Check its shape before you use it, such as with a zod schema.

Last updated