RuAPI supports two API protocols simultaneously: classic OpenAI-compatible and native Anthropic Claude-compatible. The same API key works with both.Documentation Index
Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
/v1. Auth via the Authorization: Bearer sk-... header.
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 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 into Claude protocol)max_tokens(required for Claude)stream: truetools/tool_choicethinkingfor reasoning models
Example: Python (Anthropic SDK)
Example: Node.js (Anthropic SDK)
Example: curl
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?
| Scenario | Use |
|---|---|
| Already on OpenAI SDK / LangChain / LlamaIndex | OpenAI protocol |
| Writing native Anthropic code, need thinking blocks | Claude protocol |
| Want to call Claude from existing OpenAI code | OpenAI protocol (we convert) |
| Want to call GPT-4o from Anthropic SDK | Claude protocol (we convert) |
All endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/chat/completions | OpenAI Chat Completions |
| POST | /v1/messages | Claude Messages |
| POST | /v1/embeddings | Embeddings (OpenAI compatible) |
| POST | /v1/images/generations | Image generation (OpenAI compatible) |
| POST | /v1/audio/transcriptions | Whisper transcription |
| POST | /v1/audio/speech | TTS — text to speech |
| GET | /v1/models | List of available models |