Messages API quickstart
POST https://api.kindo.ai/v1/messages speaks the Anthropic
Messages API. Stock
Anthropic clients work unmodified.
Prerequisites
- A Kindo API key (see Authentication).
- A model ID from
GET /v1/models— for example,claude-sonnet-4-5-20250929.
Claude Code
Point Claude Code at Kindo with two environment variables:
export ANTHROPIC_BASE_URL=https://api.kindo.aiexport ANTHROPIC_API_KEY=$KINDO_API_KEY
claudeClaude Code sends standard Anthropic Messages requests to
https://api.kindo.ai/v1/messages. Kindo also forwards the
x-claude-code-session-id header for upstream session continuity.
Anthropic Python SDK
import osfrom anthropic import Anthropic
client = Anthropic( base_url="https://api.kindo.ai", api_key=os.environ["KINDO_API_KEY"],)
message = client.messages.create( model="claude-sonnet-4-5-20250929", max_tokens=512, messages=[ {"role": "user", "content": "Explain Kubernetes pod security policies."} ],)
print(message.content[0].text)Anthropic TypeScript SDK
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({ baseURL: 'https://api.kindo.ai', apiKey: process.env.KINDO_API_KEY});
const message = await client.messages.create({ model: 'claude-sonnet-4-5-20250929', max_tokens: 512, messages: [ { role: 'user', content: 'Explain Kubernetes pod security policies.' } ]});
console.log(message.content[0].text);curl
curl -X POST https://api.kindo.ai/v1/messages \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $KINDO_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-sonnet-4-5-20250929", "max_tokens": 512, "messages": [ { "role": "user", "content": "Explain Kubernetes pod security policies." } ] }'The Anthropic SDKs set anthropic-version for you. Raw HTTP
clients should include it.
Response shape
{ "id": "msg_01Aq9w938a90dw8q", "type": "message", "role": "assistant", "model": "claude-sonnet-4-5-20250929", "content": [ { "type": "text", "text": "Pod Security Policies were Kubernetes rules..." } ], "stop_reason": "end_turn", "stop_sequence": null, "usage": { "input_tokens": 24, "output_tokens": 134 }}What you get by default
- A single-shot, stateless response. No persistence.
- Your
systemandmessagesflow through verbatim. Kindo does not prepend a curated system prompt. - Tools are only what you list in
tools. Kindo does not silently inject hosted tools.
Kindo’s opt-in extensions (curated system prompt, hosted tools,
stateful conversations) are available on /v1/responses. See the
Chat Actions guide for that surface.
Why route Claude Code through Kindo
- Centralized governance — same auth, model access, audit, DLP, and metering as your other Kindo APIs.
- One API key — the same Kindo key works for
/v1/messages,/v1/responses, and/v1/chat/completions. - Model consistency — Claude Code uses the model IDs your organization exposes through Kindo.
If Claude Code returns a model-not-found error, hit
GET /v1/models first and use one of the IDs available to your
organization.
Next steps
- Request shape — every standard field Kindo honors.
- Streaming — Anthropic’s SSE event types.
- Tool use —
tool_use/tool_resultround trip. - Errors — Anthropic error envelope.