RodiumAi docs
Guides

Anthropic Messages SDK

Drop-in for the Anthropic Python/TS packages: same Messages shape, Rodium key, Claude models.

POSThttps://api.rodiumai.io/v1/messages

Prefer this path when your app already uses the Anthropic SDK. OpenAI-compatible chat still works for Claude via /v1/chat/completions.

Anthropic SDK vs OpenAI SDK

OpenAI clients use base_url https://api.rodiumai.io/v1 and chat.completions. Anthropic clients use base_url https://api.rodiumai.io (no /v1) and messages.create. Same rd_sk_… secret; never send Anthropic’s server key to clients.

Install

First message

Streaming (native Anthropic SSE)

Request parameters

ParameterTypeRequiredDescription
modelstringRequiredAnthropic catalogue id (e.g. anthropic/claude-sonnet-4-6). Claude-first MVP.
messagesarrayRequiredAnthropic Messages array (role + content blocks or text).
max_tokensintegerRequiredMaximum output tokens (required by Anthropic Messages).
systemstring | arrayOptionalOptional system prompt.
streambooleanOptionalWhen true, returns native Anthropic SSE (message_start, content_block_delta, …).
temperaturenumberOptionalSampling temperature when supported.
toolsarrayOptionalAnthropic tool definitions (non-stream recommended for tool rounds).

API reference: POST /v1/messages