OpenAI · Text · API

ChatGPT API — ruble pricing and a 5-minute setup

ChatGPT API (OpenAI GPT) with ruble billing: GPT, GPT mini and nano through one Zerocoder key. Price per million tokens, streaming, OpenAI SDK, limits.

What the ChatGPT API gives you

ChatGPT is OpenAI's family of text models for chat, code, analysis and vision tasks. The family covers everything from quick, cheap replies to deep reasoning on long, complex prompts, so you pick the model that matches the job instead of overpaying for a single do-it-all endpoint.

Where the family is strong

  • Conversational products: support bots, assistants, onboarding flows
  • Code generation, review and explanation
  • Document and text analysis, summarization, extraction
  • Vision: reading images passed as content parts alongside text

What Zerocoder adds

One API key unlocks every model in the family. One ruble wallet pays for all of them, topped up with a Russian card or a company invoice, so you don't need a foreign card or a VPN. Docs and the key cabinet live on zerocoder.com, and the endpoints are compatible with the SDKs you already use.

How a request works

You send a request to /v1/messages (Anthropic-style format) or /v1/chat/completions (OpenAI-style format), naming the model id you want. Before generation, Zerocoder reserves an estimate based on your input and max_tokens; after the model answers, the real usage is charged and any difference is refunded. Both endpoints support streaming, so you can show tokens as they arrive instead of waiting for the full answer.

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
gpt-5.4recommendedalso: openai-custom:gpt-5.4per 1M tokens99 ₽min 0.5 ₽$1.10
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 9.9 ₽ · $0.110
/v1/messages
gpt-5.5recommendedper 1M tokens422 ₽min 0.5 ₽$4.69
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 42.2 ₽ · $0.469
/v1/messages
gpt-5.6-terrarecommendedper 1M tokens99 ₽min 0.5 ₽$1.10
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 9.9 ₽ · $0.110
/v1/messages
gpt-5.6-solrecommendedper 1M tokens198 ₽min 0.5 ₽$2.20
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 19.8 ₽ · $0.220
/v1/messages
gpt-5.6-lunarecommendedper 1M tokens39.6 ₽min 0.5 ₽$0.440
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 3.96 ₽ · $0.044
/v1/messages
gpt-6-lunaper 1M tokens2.2 ₽min 0.5 ₽$0.024
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 0.5 ₽ · $0.0056
/v1/messages
gpt-6.1-solper 1M tokens44.1 ₽min 0.5 ₽$0.490
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 4.41 ₽ · $0.049
/v1/messages
gpt-6-solper 1M tokens44.1 ₽min 0.5 ₽$0.490
1k-token request: 0.5 ₽ · $0.0056
100k tokens: 4.41 ₽ · $0.049
/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: gpt-5.4
# Anthropic Messages shape
curl https://zerocoder.com/api/v1/messages \
  -H "x-api-key: zc-sk-…" -H "content-type: application/json" \
  -d '{"model": "gpt-5.4", "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": "gpt-5.4", "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": "gpt-5.4",
          "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: "gpt-5.4", 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: "gpt-5.4", 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="gpt-5.4", 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: "gpt-5.4", 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="gpt-5.4", 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

Customer support bot that answers in a brand voice and escalates edge cases to a human

2

SaaS feature that drafts, rewrites or summarizes user documents on demand

3

Internal tool that reviews pull requests and explains code changes in plain language

4

Indie product that turns screenshots into structured data using vision input

5

Content pipeline that classifies, tags and extracts fields from incoming text at scale

6

Telegram or website assistant that keeps conversation history and streams replies live

Prompting tips

  • Set a clear system prompt describing the assistant's role and tone before the first user message
  • Ask explicitly for JSON or markdown in the prompt if your app needs to parse the output
  • Set max_tokens close to the expected answer length to avoid over-reserving on the estimate
  • Lower temperature for deterministic, repeatable answers; raise it for varied, creative output
  • Use stream: true for chat UIs so users see tokens appear instead of waiting for the full reply

FAQ

Which GPT models are available through the API?

Every GPT model in the live price list in the table above; the short ids gpt, gpt-mini and gpt-nano always point at the current version of each class, and the response names the model actually used.

Do I need to rewrite code written for the official OpenAI API?

No. Set base_url to https://zerocoder.com/api/v1 and a zc-sk-… key in the OpenAI SDK — the chat/completions format, streaming and error codes match.

How do I get a ChatGPT API key?

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

How is ChatGPT API billed?

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

What if ChatGPT fails to generate the answer?

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

What are the ChatGPT API rate limits?

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

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

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

Can I try ChatGPT without code?

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

AI API for your product

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