OpenAI protocol
POST /v1/chat/completions — industry standard, supported by virtually all SDKs and frameworks.Claude protocol
POST /v1/messages — native Anthropic format with thinking blocks and MCP support.Base URL
The address depends on the protocol — this is the #1 thing people get wrong: OpenAI-compatible — with/v1:
/v1 (the SDK appends /v1/messages itself):
Authorization: Bearer sk-... header (x-api-key also works on /v1/messages).
OpenAI protocol
Use this protocol if your code already uses the official OpenAI SDK or a compatible framework (LangChain, LlamaIndex, Vercel AI SDK, etc.).Endpoint
Compatibility
The request/response format matches OpenAI’s Chat Completions API. Supported:messages(with rolessystem/user/assistant/tool)model— name of any model in the catalog (Claude/Gemini/Grok/Qwen/MiniMax/GLM included — we convert on the fly)stream: truefor streaming responses (Server-Sent Events)tools/tool_choicefor function callingtemperature,top_p,max_tokensand other parameters
Example: Python (OpenAI SDK)
Example: Node.js (OpenAI SDK)
Example: curl + streaming
Claude protocol
Use this protocol if your code is built on the Anthropic SDK or you need Claude-specific features (thinking blocks, native tool calls).Endpoint
Compatibility
The request/response format matches Anthropic’s Messages API. Supported:messagesarray (native Claude format)systemas a separate fieldmodel— Claude model name or any other (we convert it into the Claude protocol)max_tokens(required for Claude)stream: truetools/tool_choicethinkingfor reasoning models
Example: Python (Anthropic SDK)
Example: Node.js (Anthropic SDK)
Example: curl
The Anthropic SDK uses the
x-api-key header instead of Authorization: Bearer. RuAPI accepts both on the /v1/messages endpoint.Which protocol should I pick?
In every case — same API key, same per-token price, shared balance.
All endpoints
The full list with current models lives on the Pricing page at www.ruapi.ai.