Skip to main content
You can call Claude in two formats: the native Anthropic format (the Messages API at /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_control markers 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

Whether the native Anthropic URL ends in /v1 depends on the tool: Claude Code, Cline, Roo Code, OpenClaw and the Anthropic SDK take it without /v1; Kilo Code, Continue and OpenCode take it with /v1. Enter exactly what the table says, or the connection won’t work. The OpenAI-compatible URL always ends in /v1.
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) with base_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 change model. For Claude caching, add cache_control markers 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.
The simplest request with curl:

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

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.
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.
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.
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.
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).
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