Skip to main content
Use the Anthropic-compatible route when your application depends on Anthropic’s request shape, SDK helpers, or named SSE events. The SDK base URL is:
The SDK appends /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 apiKey or api_key option.
  • 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

Anthropic Messages requires 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 OpenAI chat.completion.chunk objects.
  1. message_start opens the message and includes initial usage.
  2. content_block_start opens a text, thinking, or tool-use block.
  3. One or more content_block_delta events add content to that block.
  4. content_block_stop closes the block.
  5. message_delta updates message-level fields such as the stop reason and cumulative usage.
  6. message_stop closes the message.
ping events can appear anywhere between those events.
Native SSE response

Text, thinking, and tool deltas

Inspect the delta type 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
Handle 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.