APIAnthropic NativeMessages

Messages API

Create Claude conversations through the Anthropic native protocol. kineticRouter is compatible with the documented subset with the Anthropic Messages API, so you can use the official SDK directly.

Endpoint

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Authentication

The Anthropic protocol uses the x-api-key header:

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This page preserves the Anthropic-native request shape as an integration reference. This example is intentionally not copyable in its current display state.

Request Parameters

ParameterTypeRequiredDescription
modelstringModel identifier, e.g. anthropic/claude-sonnet-4.6
max_tokensnumberMaximum tokens to generate
messagesarrayMessage array
systemstringSystem prompt
temperaturenumberSampling temperature 0-1
top_pnumberNucleus sampling parameter
top_knumberTop-K sampling
streambooleanEnable streaming response
toolsarrayTool definitions
tool_choiceobjectTool selection strategy
thinkingobjectClaude thinking configuration; valid values depend on the model version
output_configobjectOutput configuration for Claude 4.6+ adaptive thinking, such as effort

Message Format

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This page preserves the Anthropic-native request shape as an integration reference. This example is intentionally not copyable in its current display state.

Claude Thinking Modes

Claude thinking parameters differ by model version. Configure thinking for the exact model you call, and do not send adaptive or budget_tokens to models that do not support them.

ModelRecommended configurationNotes
anthropic/claude-sonnet-4.5, anthropic/claude-haiku-4.5Manual thinkingUse enabled + budget_tokens; does not support adaptive
anthropic/claude-sonnet-4.6, anthropic/claude-opus-4.6Adaptive thinkingUse adaptive; manual budget_tokens still works, but is no longer recommended
anthropic/claude-opus-4.7+Adaptive thinkingUse adaptive only; does not support manual budget_tokens

budget_tokens must be less than max_tokens. Thinking consumes output tokens and is billed as output usage. If you only need the final answer, use display: "omitted" where supported to avoid returning thinking text.

Manual Thinking: Sonnet 4.5 / Haiku 4.5

claude-sonnet-4.5 and claude-haiku-4.5 use manual thinking and require an explicit budget_tokens value.

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Adaptive Thinking: Sonnet 4.6 / Opus 4.6

claude-sonnet-4.6 and claude-opus-4.6 should use adaptive thinking. Set output_config.effort to low, medium, or high based on task complexity.

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Opus 4.7+: Do Not Use budget_tokens

claude-opus-4.7+ should continue to use thinking: {"type":"adaptive"}. Do not send manual budget_tokens to these models, or the upstream provider may return a parameter error.

Request Examples

Terminal
Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Response Format

Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Streaming

anthropic_stream.py
Planned example

The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Supported Models

ModelDescription
anthropic/claude-opus-4.6Claude Opus 4 — Most capable
anthropic/claude-sonnet-4.6Claude Sonnet 4 — Balanced performance
anthropic/claude-sonnet-4.5Claude Sonnet 4.5 — Supports manual thinking
anthropic/claude-haiku-4.5Claude Haiku 4.5 — Fast responses

kineticRouter’s Anthropic protocol supports all native features, including Vision, Tool Use, Prompt Caching, Extended Thinking, and more. For the complete available model list, use the Models API or Model Plaza.