Hanzo
Start

Chat

One completion.

One completion.

OpenAI-compatible request and response. Non-streaming on purpose — streaming is a different transport (SSE) that the generated clients return as an opaque body, so demonstrating it here would teach the wrong shape. Print choices[0].message.content.

Create chat completion

POST /v1/chat/completions · reference →

OpenAI-compatible chat completions. Set stream: true for an SSE token stream (text/event-stream), otherwise a single JSON response. model accepts any model id from GET /v1/models (including the Zen ladder).

ParameterInRequiredDescription
modelbodyyes
messagesbodyyes
streambody
temperaturebody
top_pbody
max_tokensbody
toolsbody
tool_choicebody
hanzo chat completions \
  --messages '[{"role":"system"}]' \
  --model <model>

Every command, call and tool above is generated from the same OpenAPI document that generates the SDKs themselves — the four surfaces are projections of one doc comment, so they cannot disagree.

How is this guide?

On this page