Anthropic · Text · API

Claude API — ruble pricing and a 5-minute setup

Claude API with ruble billing: Opus, Sonnet and Haiku through one Zerocoder key. Per-million-token pricing, streaming, Anthropic and OpenAI SDK, limits.

What Claude models do

Claude is a family of text models from Anthropic for chat, code generation, document analysis, and vision tasks. The lineup spans several generations and tiers: Sonnet models for everyday chat and coding help, Opus models for harder reasoning and longer analysis, and Fable at the top of the range. Every model in the family also reads images passed as content parts, so you can send a screenshot or a scanned page alongside a text prompt.

What Zerocoder adds

Zerocoder gives you one API key and one ruble wallet that covers every Claude model listed in GET /v1/models, so you don't manage separate accounts or currencies. Top up the wallet with a Russian card or a company invoice straight from the cabinet — no foreign card or VPN required. Documentation is in the API docs, and both the Anthropic SDK and the OpenAI SDK work without changes once you point their baseURL at Zerocoder.

How a request and response work

Send a POST request to /v1/messages for the Anthropic format or /v1/chat/completions for the OpenAI format, with your key in the Authorization header and the model id in the body. Add stream: true to get the answer token by token, which suits chat interfaces. Before generation Zerocoder reserves an estimated cost from your input and max_tokens; once the model finishes, the real usage is charged and the difference goes back to your balance. If the provider itself fails, the charge is refunded automatically in the same response.

Available models and prices

Built from the live GET /v1/models price list: prices include our margin, in rubles and in dollars at the internal rate. Anything missing is temporarily not served by the gateway.

ModelUnit₽$Cost examplesEndpoint
claude-opus-5recommendedalso: claude-custom-opusper 1M tokens198 ₽min 0.5 ₽$2.20
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 19.8 ₽ · $0.220
/v1/messages
claude-sonnet-4.6recommendedalso: claude-custom-defaultper 1M tokens119 ₽min 0.5 ₽$1.32
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 11.9 ₽ · $0.132
/v1/messages
claude-sonnet-5recommendedper 1M tokens114 ₽min 0.5 ₽$1.27
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 11.4 ₽ · $0.127
/v1/messages
claude-fable-5recommendedalso: claude-custom-fableper 1M tokens726 ₽min 0.5 ₽$8.07
1k-token request: 0.726 ₽ · $0.0081
100k tokens: 72.6 ₽ · $0.807
/v1/messages
claude-sonnet-5.5per 1M tokens145 ₽min 0.5 ₽$1.62
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 14.5 ₽ · $0.162
/v1/messages
claude-opus-4.6per 1M tokens198 ₽min 0.5 ₽$2.20
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 19.8 ₽ · $0.220
/v1/messages
claude-opus-4.8per 1M tokens198 ₽min 0.5 ₽$2.20
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 19.8 ₽ · $0.220
/v1/messages
claude-opus-4.7per 1M tokens198 ₽min 0.5 ₽$2.20
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 19.8 ₽ · $0.220
/v1/messages
claude-opus-5.5per 1M tokens382 ₽min 0.5 ₽$4.24
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 38.2 ₽ · $0.424
/v1/messages

Cost calculator

Pick a model and a volume — the calculator uses the same formulas as API billing.

per call0.5 ₽ $0.0056
per month · 1,000500 ₽ $5.56

minimum per call: 0.5 ₽

Prices from GET /v1/models, internal exchange rate. Failed generations are not charged.

First request

One zc-sk-… key, the x-api-key header (or Authorization: Bearer), base URL https://zerocoder.com/api/v1. Samples are generated from the real route contracts.

1

Create a key

Account → API: top up the balance in rubles and create a zc-sk-… key

2

Send a request

Copy the sample below — the model id is already taken from the price list.

3

Check the charge

GET /v1/balance shows the balance; the call price comes back in the response.

model: claude-opus-5
# Anthropic Messages shape
curl https://zerocoder.com/api/v1/messages \
  -H "x-api-key: zc-sk-…" -H "content-type: application/json" \
  -d '{"model": "claude-opus-5", "max_tokens": 400,
       "messages": [{"role": "user", "content": "Summarise the key risks in this contract in five bullet points."}]}'

# OpenAI chat/completions shape with streaming
curl -N https://zerocoder.com/api/v1/chat/completions \
  -H "authorization: Bearer zc-sk-…" -H "content-type: application/json" \
  -d '{"model": "claude-opus-5", "stream": true,
       "messages": [{"role": "user", "content": "Summarise the key risks in this contract in five bullet points."}]}'
import requests

r = requests.post("https://zerocoder.com/api/v1/chat/completions",
    headers={"authorization": "Bearer zc-sk-…"},
    json={"model": "claude-opus-5",
          "messages": [{"role": "user", "content": "Summarise the key risks in this contract in five bullet points."}]})
r.raise_for_status()
print(r.json()["choices"][0]["message"]["content"])
const r = await fetch("https://zerocoder.com/api/v1/messages", {
  method: "POST",
  headers: { "x-api-key": "zc-sk-…", "content-type": "application/json" },
  body: JSON.stringify({ model: "claude-opus-5", max_tokens: 400, messages: [{ role: "user", content: "Summarise the key risks in this contract in five bullet points." }] }),
});
const msg = await r.json();
console.log(msg.content[0].text);

Official SDKs

import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://zerocoder.com/api/v1", apiKey: "zc-sk-…" });
const r = await client.chat.completions.create({ model: "claude-opus-5", messages: [{ role: "user", content: "Hello!" }] });
from openai import OpenAI
client = OpenAI(base_url="https://zerocoder.com/api/v1", api_key="zc-sk-…")
r = client.chat.completions.create(model="claude-opus-5", messages=[{"role": "user", "content": "Hello!"}])
import Anthropic from "@anthropic-ai/sdk";
// baseURL WITHOUT /v1 — the SDK appends /v1/messages itself
const client = new Anthropic({ baseURL: "https://zerocoder.com/api", apiKey: "zc-sk-…" });
const msg = await client.messages.create({ model: "claude-opus-5", max_tokens: 300, messages: [{ role: "user", content: "Hello!" }] });
from anthropic import Anthropic
client = Anthropic(base_url="https://zerocoder.com/api", api_key="zc-sk-…")
msg = client.messages.create(model="claude-opus-5", max_tokens=300, messages=[{"role": "user", "content": "Hello!"}])

Inputs, limits and refunds

  • Two shapes: Anthropic Messages (/v1/messages, x-api-key) and OpenAI chat/completions (Bearer)
  • Streaming: Anthropic SSE with a billing event at the end; OpenAI chunks and data: [DONE]
  • Billed per input + output tokens at the per-1M price, minimum per call in min_rub
  • A reserve by max_tokens (default 2048) is taken before the answer and settled after
  • Failure before the first token — the reserve is refunded
  • 30 requests per minute per key (all endpoints combined); model: smart picks the model tier itself

Error responses and refunds

# 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid or revoked API key."}}
# 402 {"type":"error","error":{"type":"billing_error","message":"Not enough API balance: …"}}
# 429 {"type":"error","error":{"type":"rate_limit_error","message":"…"}}   ← 30 requests/min per key
# 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unknown model \"…\". See GET /v1/models."}}
# /chat/completions uses the OpenAI envelope: {"error":{"message":"…","type":"…","code":"insufficient_balance"}}
# streaming: the reserve (by max_tokens) is settled after the answer; a failure before the first token is refunded
# event: billing {"charged_rub":…,"reserved_rub":…,"balance_rub":…,"unit":"1M_tokens","rub_per_mtok":…}

Use cases

1

Build a support chatbot that answers customer questions and escalates hard cases to a human agent

2

Add a code review assistant to internal dev tools that comments on pull requests automatically

3

Run a document pipeline that summarizes contracts and pulls out key clauses in bulk

4

Build a vision-enabled app that turns screenshots or scanned forms into structured text

5

Power an indie SaaS writing tool that drafts and edits marketing copy on request

6

Automate internal reporting by turning raw data exports into plain-language summaries for your team

Prompting tips

  • Set a system message to fix the assistant's role and tone for the whole conversation, not just one reply
  • State the output format in the prompt — ask directly for JSON or markdown if you need structured text
  • Set max_tokens to match the expected reply length; the default reservation covers long answers, not short ones
  • Lower temperature for consistent, repeatable output like data extraction; raise it for varied, creative writing
  • Use stream: true for chat UIs, and pick the cheap tier for simple replies and the top tier for complex reasoning

FAQ

Which Claude models are available through the API?

Every Claude model in the live price list in the table above — Opus, Sonnet, Haiku and their versions; the short ids claude-opus, claude-sonnet and claude-haiku always point at the current version of each class.

Does the official Anthropic SDK work with Zerocoder?

Yes: set baseURL to https://zerocoder.com/api (without /v1 — the SDK appends /v1/messages itself) and use a zc-sk-… key. Requests and responses, including streaming, match the Anthropic Messages API.

How do I get a Claude API key?

Sign up at Zerocoder, open the API section of your account and create a zc-sk-… key. The same key unlocks Claude and every other model in the catalogue — no separate Claude key needed.

How is Claude API billed?

Top up the API balance in rubles (Russian bank card or invoice for companies). Usage is charged per Claude token (input + output) at the price returned by GET /v1/models; Claude prices already include our margin, there are no hidden fees.

What if Claude fails to generate the answer?

If Claude fails before the first token, the reserve is refunded automatically. You only pay for a finished answer.

What are the Claude API rate limits?

A shared limit of 30 requests per minute per key across all generation endpoints, Claude included. Above that you get 429 rate_limit_error; for higher Claude volumes contact us and we raise it individually.

Do I need a VPN or a foreign card for Claude API?

No. Claude requests go to zerocoder.com, payment is in rubles, and accounting documents are available on request.

Can I try Claude without code?

Yes: Claude is available in the Zerocoder studio and in the free tools catalogue — check the quality by hand, then wire up the Claude API.

AI API for your product

70% cheaper than the official APIs — one key for GPT, Claude, Gemini, images and video