DozzyWizard Docs

Search docs

Jump to a page

Chat Completions

POST/api/v1/chat/completions

Sends a message to a model and returns its full reply. Non-streaming — the response is a single JSON object once the model finishes.

Request body

FieldTypeRequiredDescription
modelstringyesA modelId from Models
messagesarrayyes{ role, content } objects, in order
max_tokensnumbernoCaps the reply length
temperaturenumbernoSampling temperature
json
{
  "model": "anthropic/claude-haiku-4.5",
  "messages": [
    { "role": "user", "content": "Explain wallets in one sentence." }
  ],
  "max_tokens": 200
}

Response

json
{
  "id": "string",
  "model": "string",
  "message": { "role": "assistant", "content": "string" },
  "usage": { "promptTokens": 0, "completionTokens": 0 },
  "cost": 0.0
}

Errors

StatusMeaning
401Missing or invalid API key
402Insufficient wallet balance
403API key is inactive
400model is missing or not in the catalog
429A request from this key's account is already in progress
502The model call itself failed — not billed