/v1/messages to that base URL. Raw HTTP clients should call the full https://api.inquantum.ai/anthropic/v1/messages URL.
For POST /anthropic/v1/messages, Planck maps the Messages request through the standard gateway pipeline. The simplest setup uses one credential:
- Give the Anthropic SDK your Planck API key through its
apiKeyorapi_keyoption. - The SDK sends that value as
x-api-key, which Planck accepts for authentication.
The option name comes from the Anthropic SDK. It is not a compatibility label;
it must contain your actual Planck API key.
Stream with the Anthropic SDK
max_tokens; the SDK requires it as well. For an explicit Anthropic BYOK key, keep the Planck key in the SDK’s apiKey/api_key option and add X-Provider-Key: $ANTHROPIC_API_KEY through the SDK’s default headers.
Event lifecycle
Native Anthropic streams use named SSE events rather than OpenAIchat.completion.chunk objects.
message_startopens the message and includes initial usage.content_block_startopens a text, thinking, or tool-use block.- One or more
content_block_deltaevents add content to that block. content_block_stopcloses the block.message_deltaupdates message-level fields such as the stop reason and cumulative usage.message_stopcloses the message.
ping events can appear anywhere between those events.
Native SSE response
Text, thinking, and tool deltas
Inspect the deltatype instead of assuming every content event contains text.
Tool arguments in
input_json_delta are partial JSON strings. They follow the same rule as streamed OpenAI tool calls: accumulate first, parse once the block is complete.
Errors and forward compatibility
An error can arrive after the HTTP stream has started:Error event
error events even when the HTTP response began with 200. Ignore unknown event types safely; Anthropic can add event types over time without changing the API version.
Choose the right route
Anthropic-compatible reference
Review authentication, Messages mapping, and native path behavior.
OpenAI-compatible streaming
Stream across supported providers with Chat Completions.