/v1/messages) and the OpenAI-compatible format (Chat Completions at /v1/chat/completions). On RuAPI, one key works with both and the price is the same; they differ in how you write the request and which features you get. This page covers the differences and which format to choose. RuAPI works from Russia without a VPN, and you top up your balance with USDT.
The short answer
- If your tool lets you pick an Anthropic provider, or your app only uses Claude, use the native Anthropic format. Requests look the same as in Anthropic’s own documentation, and caching works just as it does with Anthropic: Claude Code and similar tools set the cache markers themselves. Claude Code only works in this format.
- If your tool only supports the OpenAI format, or the same code has to switch between Claude, GPT, DeepSeek and Gemini, use the OpenAI-compatible format. On RuAPI, caching, thinking and PDFs work in this format too; caching just needs
cache_controlmarkers in the request.
How the formats differ
What RuAPI’s OpenAI-compatible format adds over Anthropic’s own
Anthropic offers its own OpenAI-compatible layer too. Its documentation says the layer is mainly meant for testing and comparing models, isn’t considered a long-term or production-ready solution for most use cases, and many features don’t work in it. On RuAPI, we convert OpenAI-compatible requests into native Claude requests ourselves, so all of the following works:
The Anthropic column is based on Anthropic’s OpenAI SDK compatibility documentation (checked Oct 19, 2026).
Which one to choose
Coding agents
Other tools (JetBrains AI Assistant, n8n, Cherry Studio and more) connect in the OpenAI-compatible format by following their own guides, at
https://www.ruapi.ai/v1. Claude works fine this way, but if the tool doesn’t set cache markers, nothing gets cached and long conversations cost more.
Your own code
- Claude only: use the Anthropic SDK (
pip install anthropic) withbase_url="https://www.ruapi.ai". You get the most features, and caching, thinking and PDFs are written the same way as in Anthropic’s documentation. - Models from different vendors: use the OpenAI SDK with
base_url="https://www.ruapi.ai/v1"; to switch models, you only changemodel. For Claude caching, addcache_controlmarkers to the request, as shown in Prompt caching.
The same request in both formats
Both snippets do the same thing: ask Claude a question with a system prompt and get its thinking text back.How to tell which format you’re using
Open a Claude entry in the console’s Usage Logs and look at “Request path”:/v1/chat/completions means the OpenAI-compatible format, /v1/messages means the native Anthropic format. Other ways to tell are in “Which format are you using?” on the Prompt caching page.
FAQ
Is the price the same in both formats?
Is the price the same in both formats?
Yes. RuAPI bills by model, and the format doesn’t affect the price. One key works in both formats, so you don’t need a separate key.
Why does Claude drain my balance fast in the OpenAI-compatible format?
Why does Claude drain my balance fast in the OpenAI-compatible format?
Most likely the cache isn’t working, so the repeated context is billed at full price every time. Pick the Anthropic provider in your tool, or add
cache_control markers to the request. For a step-by-step check, see the FAQ on the Prompt caching page.Why does the response stop halfway?
Why does the response stop halfway?
Check
finish_reason (OpenAI-compatible format) or stop_reason (native Anthropic format): length or max_tokens means the response hit the length limit. If the request has no max_tokens, RuAPI sets it to 8192 tokens; for longer responses, set a higher max_tokens. Thinking tokens count toward max_tokens too.Why is the thinking text empty?
Why is the thinking text empty?
Claude 5 models (for example Sonnet 5.5, Opus 5.5 and Haiku 5.5) think by default but don’t return the thinking text. In the native Anthropic format, ask for it explicitly with
thinking: {"type": "adaptive", "display": "summarized"}. In the OpenAI-compatible format, setting reasoning_effort is enough: RuAPI takes care of the rest. For a simple question, Claude may answer right away without thinking, and then an empty thinking text is normal.Why does forcing a tool call return a 400 error?
Why does forcing a tool call return a 400 error?
Claude Opus 5.5, Claude Sonnet 5.5 and Claude Fable 5.1 don’t support forced tool use. Forcing a tool (
tool_choice: "required" or a specific function name in the OpenAI-compatible format, {"type": "any"} or {"type": "tool"} in the native Anthropic format) returns a 400 error in both formats. Use auto and say in the prompt when the tool should be used. Source: Anthropic’s Thinking documentation (checked Oct 19, 2026).Why is there no Claude caching in the OpenAI-compatible format on another gateway?
Why is there no Claude caching in the OpenAI-compatible format on another gateway?
Not every gateway supports it: Anthropic’s own OpenAI-compatible layer doesn’t support caching, and some gateways state in their docs that the cache discount only applies in the native Anthropic format. On RuAPI, Claude caching works in both formats.
Next steps
- Prompt caching: how to turn on Claude caching in both formats and check that it works.
- Claude API: how the tiers differ and which one to choose.
- Claude Code: connect Claude Code to RuAPI.
- Function calling: a full tool-calling example.