Skip to main content
Use the native Anthropic route when your application depends on Anthropic’s request shape, SDK helpers, or named SSE events. The native base path is:
Native passthrough uses two credentials:
  • Planck-Auth authenticates the request to Planck.
  • x-api-key authenticates the request to Anthropic.
For provider-independent routing with an Anthropic-style request, use the mapped POST /v1/messages route instead.

Stream with the Anthropic SDK

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

Native Anthropic reference

Review authentication and native path behavior.

OpenAI-compatible streaming

Stream across supported providers with Chat Completions.