Messages
POST https://api.zonetoken.net/v1/messagesGenerate a model response using the Anthropic-style Messages API. Useful when your tooling expects Anthropic's request and response shape.
Authentication
Authorization: Bearer <apiKey>TIP
The Messages endpoint accepts the standard Authorization: Bearer <apiKey> header. Tools that use x-api-key (Anthropic's native header) also work.
Request body
| Field | Type | Description |
|---|---|---|
model | string | The model id, e.g. claude-sonnet-4.6. |
messages | array | The conversation, as { role, content } objects. |
max_tokens | number | Maximum number of tokens to generate. |
system | string | Optional. A system prompt. |
Request
bash
curl https://api.zonetoken.net/v1/messages \
-H "Authorization: Bearer $ZONETOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4.6",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, ZoneToken!" }
]
}'json
{
"model": "claude-sonnet-4.6",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, ZoneToken!" }
]
}Response
json
{
"id": "msg_abc123",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4.6",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 10
}
}