POST
/v1/messages
API reference
Anthropic-compatible endpoint — the native format of Claude models. Claude Code, the Anthropic SDK, and Roo Code use it.
- Key in
Authorization: Bearer fetch_...orx-api-key: fetch_.... Zukko does not requireanthropic-version, but passes it to the provider if present. - GLM models (
glm-5.3,glm-5.3-flash) work through this endpoint too: Zukko converts the request to the OpenAI format and the response and stream back to the Anthropic format.
Request
JSON
bash
{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Tell me about quantum physics"}
],
"system": "You are a helpful assistant"
}Parameters
Parameter
Type
Required
Description
model
string
Yes
Model ID
max_tokens
integer
Yes
Max. tokens in the response
messages
array
Yes
Array of messages
system
string
No
System prompt
stream
boolean
No
Streaming
temperature
float
No
Temperature (0-1)
top_p
float
No
Nucleus sampling
top_k
integer
No
Top-K sampling
tools
array
No
Tools (function calling)
tool_choice
object
No
Tool selection
stop_sequences
array
No
Stop sequences
metadata
object
No
Request metadata
Response
JSON
bash
{
"id": "msg_...",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-5",
"content": [
{
"type": "text",
"text": "Quantum physics is a branch of..."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 25,
"output_tokens": 150
}
}