NotHolyDocumentation
Open chat

Anthropic Messages

Text and tool blocks using the documented Messages protocol subset.

POST/v1/messages

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.

Buffered native streaming

The service waits for authoritative usage before emitting message_start, indexed block events, message_delta and message_stop. Official SDK accumulators reconstruct final text and function JSON. This buffering is an explicit latency limitation.

Unsupported features

Images, documents, cache controls, thinking controls, server tools, stop sequences, sampling and explicit parallel-control options are rejected. Ordinary input usage excludes separately reported cache-read tokens.

Request example

Use your own customer key. Confirm the model is published and your API wallet is funded. Copying an example never sends a request.

curl
curl https://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 production availability.

Request fields

Generated from the versioned contract. Refinement rules above still apply.

systemstring | array<object>

Show accepted variants
Variant 1string

Up to 131072 characters.

Variant 2array<object>

Up to 128 items.

Show item fields
type"text"required

textstringrequired

Up to 131072 characters.

modelstringrequired

Up to 100 characters.

max_tokensintegerrequired

Minimum 32. Maximum 4096.

messagesarray<object>required

Up to 128 items. At least 1 item.

Show item fields
role"user" | "assistant" | "system"required

contentstring | array<object | object | object>required

Show accepted variants
Variant 1string

Up to 131072 characters.

Variant 2array<object | object | object>

Up to 128 items. At least 1 item.

streamboolean

toolsarray<object>

Up to 8 items.

Show item fields
namestringrequired

descriptionstring

Up to 1000 characters.

input_schemaobjectrequired

Show object fields
type"object"required

propertiesobject

requiredarray<string>

additionalPropertiesboolean

tool_choiceobject | object

Show accepted variants
Variant 1object

Unknown fields rejected.

Show object fields
type"auto" | "any" | "none"required

Variant 2object

Unknown fields rejected.

Show object fields
type"tool"required

namestringrequired

Response schema

idstringrequired

type"message"required

role"assistant"required

contentarray<object | object>required

modelstringrequired

stop_reason"end_turn" | "tool_use" | "max_tokens" | nullrequired

stop_sequencenullrequired

usageobjectrequired

Unknown fields rejected.

Show object fields
input_tokensintegerrequired

Minimum 0. Maximum 9007199254740991.

output_tokensintegerrequired

Minimum 0. Maximum 9007199254740991.

cache_creation_input_tokensintegerrequired

Minimum 0. Maximum 9007199254740991.

cache_read_input_tokensintegerrequired

Minimum 0. Maximum 9007199254740991.