Messages
Anthropic-native Messages API request body. Forwarded byte-for-byte to the upstream
provider — cache_control markers are preserved exactly where the client placed them
(system blocks, message content blocks, tool definitions, top-level).
Model identifier or alias resolved against the company's configured models. Must resolve to an Anthropic-provider model.
System prompt as a single string or as an array of text blocks (each may carry cache_control).
Maximum output tokens. Set to 0 to warm the prompt cache without generating output.
Sampling temperature. Note: the newest Claude models (Sonnet 4.6+/5) reject temperature, top_p, and top_k as deprecated.
Nucleus sampling. Rejected as deprecated by the newest Claude models.
Top-k sampling. Rejected as deprecated by the newest Claude models.
falseControls how the model selects tools.
Extended thinking configuration.
Anthropic API service tier. Note: models hosted on Vertex AI (currently all Claude models on the platform) reject this parameter.
Container reference for code-execution tools. Note: models hosted on Vertex AI (currently all Claude models on the platform) reject this parameter.
OK
Anthropic-native non-streaming Messages API response.
Additional details about why the model stopped, when available.
POST /v1/messages HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 137
{
"model": "Claude Sonnet 5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "how many letters 'r' are in the word 'strawberry'?"
}
]
}OK
{
"id": "text",
"type": "message",
"role": "assistant",
"model": "text",
"content": [
{
"type": "text",
"text": "text",
"cache_control": {
"type": "ephemeral",
"ttl": "5m"
},
"citations": [
{
"type": "text",
"cited_text": "text",
"document_index": 1,
"document_title": "text",
"start_char_index": 1,
"end_char_index": 1,
"start_page_number": 1,
"end_page_number": 1,
"start_block_index": 1,
"end_block_index": 1
}
]
}
],
"stop_reason": "end_turn",
"stop_sequence": "text",
"stop_details": {},
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"cache_creation_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_creation": {
"ephemeral_5m_input_tokens": 1,
"ephemeral_1h_input_tokens": 1
},
"output_tokens_details": {
"thinking_tokens": 1
},
"service_tier": "text",
"server_tool_use": {
"web_search_requests": 1
},
"nexos_credits_cost": 1
},
"container": {
"id": "text",
"expires_at": "2026-01-01T00:00:00.000Z"
}
}Last updated

