Anthropic Messages
Text and tool blocks using the documented Messages protocol subset.
Updated October 31, 2026 · Contract 0.2.0
Request contract
Supply the current anthropic-version header and max_tokens. Use user/assistant text plus top-level system text. The adapter also accepts bounded system-role text. This protocol serves NotHoly models, not Claude weights.
Tools and result order
Assistant tool_use blocks pair with user tool_result blocks. Results precede new user text. Assistant text after tool-use blocks is unsupported to avoid silently reordering content. The caller executes functions.
Incremental native streaming
The stream sends message_start, indexed content_block_start/delta/stop events, message_delta and successful message_stop. Text and validated tool-argument progress arrive while generation is running. An error emits a native error event without a false successful terminal event. Official SDK accumulators reconstruct the result.
Unsupported features
Images, documents, cache controls, thinking controls, server tools, stop sequences, sampling and explicit parallel-control options are rejected. Supported provider-visible thinking uses an empty signature and x-notholy-thinking-signature: unavailable; no Claude integrity signature is fabricated. Only these unsigned assistant blocks can round-trip. Ordinary input usage excludes cache-read tokens.
Request example
Use your customer key and a published model. Copying an example does not send a request.
curl https://api.notholy.com/v1/messages \
-H "Authorization: Bearer $NOTHOLY_API_KEY" \
-H "anthropic-version: 2026-10-21" \
-H "Content-Type: application/json" \
-d '{
"model": "notholy-pulse",
"messages": [
{
"role": "user",
"content": "Explain least privilege."
}
],
"max_tokens": 256
}'HTTP contract fixture. Fixture checks are separate from live model availability.
Request fields
Generated from the versioned contract. Refinement rules above still apply.
systemstring | array<object>Show accepted variants
Variant 1stringUp to 1,048,576 characters.
Variant 2array<object>Up to 128 items.
Show item fields
type"text"requiredtextstringrequiredUp to 1,048,576 characters.
modelstringrequiredUp to 100 characters.
max_tokensintegerrequiredMinimum 1. Maximum 512,000.
messagesarray<object>requiredUp to 128 items. At least 1 item.
Show item fields
role"user" | "assistant" | "system"requiredcontentstring | array<object | object | object | object>requiredShow accepted variants
Variant 1stringUp to 1,048,576 characters.
Variant 2array<object | object | object | object>Up to 128 items. At least 1 item.
streambooleantoolsarray<object>Up to 8 items.
Show item fields
namestringrequireddescriptionstringUp to 1,000 characters.
input_schemaobjectrequiredShow object fields
type"object"requiredpropertiesobjectrequiredarray<string>additionalPropertiesbooleantool_choiceobject | objectShow accepted variants
Variant 1objectUnknown fields rejected.
Show object fields
type"auto" | "any" | "none"requiredVariant 2objectUnknown fields rejected.
Show object fields
type"tool"requirednamestringrequiredResponse schema
idstringrequiredtype"message"requiredrole"assistant"requiredcontentarray<object | object | object>requiredmodelstringrequiredstop_reason"end_turn" | "tool_use" | "max_tokens" | nullrequiredstop_sequencenullrequiredusageobjectrequiredUnknown fields rejected.
Show object fields
input_tokensintegerrequiredMinimum 0. Maximum 9,007,199,254,740,991.
output_tokensintegerrequiredMinimum 0. Maximum 9,007,199,254,740,991.
cache_creation_input_tokensintegerrequiredMinimum 0. Maximum 9,007,199,254,740,991.
cache_read_input_tokensintegerrequiredMinimum 0. Maximum 9,007,199,254,740,991.