Skip to content

Your first request

The chat completions body field by field, what comes back, and the two headers worth knowing about.

Every request is a POST to /v1/chat/completions with a JSON body. The fields below are the ones that matter; anything else an OpenAI client sends is accepted and passed through where the provider supports it.

The body

json
{
  "model": "anthropic/claude-sonnet-5",
  "messages": [
    {"role": "system", "content": "You are terse."},
    {"role": "user", "content": "Summarise this in one line."}
  ],
  "max_tokens": 256,
  "stream": false,
  "thinking": {"type": "disabled"}
}
Field Required Notes
model yes A name from the catalogue.
messages yes The usual system / user / assistant roles.
max_tokens no Caps the completion. Also caps what it can cost.
stream no See Streaming.
thinking no Reasoning budget, on models that have one.

Headers

Two beyond the usual:

http
Authorization: Bearer sk-ww-…
Content-Type: application/json
Webway-ZDR: required

Webway-ZDR: required refuses the request rather than sending it to a provider that would retain it. See Zero data retention.

What comes back

The standard object, plus a usage block that is the same figure the ledger draws from:

json
{
  "id": "chatcmpl-…",
  "model": "anthropic/claude-sonnet-5",
  "choices": [{"index": 0, "message": {"role": "assistant", "content": "…"}}],
  "usage": {"prompt_tokens": 41, "completion_tokens": 12, "total_tokens": 53}
}

Prompt and completion tokens are priced separately, and output is the dearer of the two on every model in the catalogue. Capping max_tokens is the cheapest optimisation available.