# Responses and usage Source: https://docs.getworg.com/responses A response has the OpenAI shape. usage says what the request used, and that is what Worg bills. ## Response Response: ```json { "id": "chatcmpl-req_tVJMBaXIcyDHuiQT2Ljh8WAG", "object": "chat.completion", "created": 1793729613, "model": "deepseek-v4.1-flash:cached", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Halo!" }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 9, "completion_tokens": 4, "total_tokens": 13, "prompt_tokens_details": { "cached_tokens": 0 } } } ``` - `id` is `chatcmpl-` followed by the request ID, the same value as the `x-request-id` header. In a stream every chunk carries the same `id`. - `model` is the lane that answered. When you sent a renamed ID, it is the current ID. Through a combo, it is the lane that served the request. - `message` has `content`, `reasoning_content` when the model reasoned (see [Reasoning](https://docs.getworg.com/reasoning)), and `tool_calls` when it called a function. - `logprobs` is `null` unless you asked for it on a lane that returns it (see [lane differences](https://docs.getworg.com/models#differences)). ## Finish reasons - `stop`: the model finished, or reached one of your `stop` strings. - `length`: the output reached `max_tokens`. The text is cut off, so JSON output may not parse. - `tool_calls`: the model wants your code to run the functions in `tool_calls`. ## Token usage - `prompt_tokens` counts all input: messages, tool definitions, and images. - `prompt_tokens_details.cached_tokens` is the part of the input served from the model's cache. It is billed at the cached rate. Cache hits are not guaranteed; they come when a request repeats the start of a recent one. - `completion_tokens` counts all output, reasoning included. Reasoning tokens are not reported separately, because not every lane reports them. - With reasoning on, `prompt_tokens` is a little higher for the same messages (16 tokens became 42 in one test), because the model's template adds instructions. ## How a request is billed Worg multiplies each kind of token by the lane's price per 1M tokens and rounds the sum up to a whole micro-dollar (US$0.000001). New input is`prompt_tokens` minus `cached_tokens`. The price is the one in force when the request ran, and it is recorded with the request. Example: a request on `deepseek-v4.1-flash:cached` with a long document in the system message, sent a second time a few seconds after the first. 5,774 of its 6,277 prompt tokens came from the cache. | Part | Tokens | US$ per 1M | Micro-US$ | | --- | --- | --- | --- | | New input | 503 | 0.3 | 150.9 | | Cached input | 5,774 | 0.006 | 34.644 | | Output | 2 | 1.2 | 2.4 | | Charged | | | 188 (US$0.000188) | Prices read from the API when this page was built. Current prices: [Models and pricing](https://getworg.com/models/). - Requests refused before a lane is called, and requests the model rejects, are not billed. - If a lane sends no usage, Worg bills an estimate: the input at the bound used for the [cost hold](https://docs.getworg.com/rate-limits#hold), and one output token per 3 bytes of generated text. - Every request appears in the console under Usage with its tokens and cost. ## Headers - `x-request-id` on every chat completion response, errors included, except `401` and `413 body_too_large`. Send it when you contact support. - `retry-after`, in seconds, on `429` responses. See [Retries](https://docs.getworg.com/errors#retries). Next: [Streaming](https://docs.getworg.com/streaming) ยท [Rate limits](https://docs.getworg.com/rate-limits)