Anthropic-style API
For clients that speak Anthropic's Messages API. Base address: https://dev.typno.ai; the endpoint is POST https://dev.typno.ai/v1/messages.
Authenticate with x-api-key: tpk-... or Authorization: Bearer tpk-.... The anthropic-version header is accepted but not required.
curl https://dev.typno.ai/v1/messages \
-H "x-api-key: $TYPNO_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "mistral4-119b",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'
from anthropic import Anthropic
client = Anthropic(base_url="https://dev.typno.ai", auth_token="tpk-...")
message = client.messages.create(
model="mistral4-119b",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
What works
model, messages, system, max_tokens, temperature, top_p, top_k, stop_sequences, stream, tools and tool_choice. Streaming uses Anthropic's event types. Images go in as image content blocks on models with vision.
POST /v1/messages/count_tokens returns an estimate, which is enough for agents that plan their context.
What does not
The models are open-weight models, not Claude. Options that only exist for Claude are ignored: extended thinking settings, prompt caching (cache_control), context management and Anthropic's server tools such as web search. PDF documents are not accepted as content blocks.
This endpoint has no fallback to a second datacenter. During an outage, use the OpenAI-style API or retry later.