OpenAI · Images · API

GPT Image API — ruble pricing and a 5-minute setup

GPT Image API (OpenAI) with ruble billing: ChatGPT image generation and editing through one Zerocoder key. Per-image pricing, OpenAI SDK, code samples, limits.

What GPT Image is good at

GPT Image is a family of OpenAI models for generating and editing pictures from a text prompt. One call creates an image from scratch, another call edits an existing one — swap a background, change color, add or remove an object, while keeping the rest of the picture untouched.

The family handles product shots, illustrations, UI mockups, social media visuals and quick edits on uploaded photos. You describe the result in plain text and get back a finished image, no manual masking or layers required.

What Zerocoder adds

One API key and one ruble wallet work for every model in the lineup — gpt-image-2, gpt-image-2.5 and gpt-image-2-vip — plus every other model on the platform. Top up the wallet with a Russian card or a company invoice, no foreign card or VPN needed. Docs, the key and the balance all live in your cabinet; prices for every model are listed in GET /v1/models.

How a request works

You send a prompt and a model id to POST /v1/images/generations, choosing a size or aspect ratio. For edits, you send the same prompt plus the source image (or up to four images) to POST /v1/images/edits. Both endpoints answer with a JSON object holding a temporary URL to the result — download it right away, since the link expires.

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-image-2recommendedalso: openai-image:gpt-image-2per image2.4 ₽$0.027
1 generation: 2.4 ₽ · $0.027
10 generations: 24 ₽ · $0.267
/v1/images/generations
gpt-image-2.5recommendedper image2.4 ₽$0.027
1 generation: 2.4 ₽ · $0.027
10 generations: 24 ₽ · $0.267
/v1/images/generations
gpt-image-2-viprecommendedper image3.6 ₽$0.040
1 generation: 3.6 ₽ · $0.040
10 generations: 36 ₽ · $0.400
/v1/images/generations

Cost calculator

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

per image2.4 ₽ $0.027
per month · 1024 ₽ $0.267

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-image-2
curl https://zerocoder.com/api/v1/images/generations \
  -H "x-api-key: zc-sk-…" -H "content-type: application/json" \
  -d '{"model": "gpt-image-2", "prompt": "Studio photo of a ceramic coffee mug on a walnut table, soft window light", "aspect": "1:1"}'
# → {"created":…,"data":[{"url":"https://…"}]}   (the URL is temporary — download it)
import requests

r = requests.post("https://zerocoder.com/api/v1/images/generations",
    headers={"x-api-key": "zc-sk-…"},
    json={"model": "gpt-image-2", "prompt": "Studio photo of a ceramic coffee mug on a walnut table, soft window light", "aspect": "1:1"})
r.raise_for_status()
print(r.json()["data"][0]["url"])
const r = await fetch("https://zerocoder.com/api/v1/images/generations", {
  method: "POST",
  headers: { "x-api-key": "zc-sk-…", "content-type": "application/json" },
  body: JSON.stringify({ model: "gpt-image-2", prompt: "Studio photo of a ceramic coffee mug on a walnut table, soft window light", aspect: "1:1" }),
});
const { data } = await r.json();
console.log(data[0].url);

Image editing (/images/edits)

# JSON — image(s) by https URL or data URI, up to 4
curl https://zerocoder.com/api/v1/images/edits \
  -H "x-api-key: zc-sk-…" -H "content-type: application/json" \
  -d '{"model": "gpt-image-2", "prompt": "Make it a night scene", "image": "https://example.com/photo.jpg", "aspect": "16:9"}'

# multipart — files from disk (≤ 8 MB each)
curl https://zerocoder.com/api/v1/images/edits \
  -H "x-api-key: zc-sk-…" \
  -F model=gpt-image-2 -F prompt="Make it a night scene" -F aspect=16:9 \
  -F "image[]=@photo1.jpg" -F "image[]=@photo2.jpg"

Inputs, limits and refunds

  • Generation: prompt + aspect 1:1 / 16:9 / 9:16 / 4:3 / 3:4 or size 1024x1024 / 1792x1024 / 1024x1792
  • Editing: up to 4 images — https URLs, data URIs or multipart
  • Up to 8 MB per file, 48 MB per request (413 otherwise)
  • The result URL is temporary — save the file right away
  • Provider failure — nothing is charged
  • 30 requests per minute per key (all endpoints combined)

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."}}
# 413 {"type":"error","error":{"type":"invalid_request_error","message":"…"}}   ← > 8 MB per file / > 48 MB body
# 502 {"type":"error","error":{"type":"api_error","message":"…"}}                ← provider failed → nothing charged

Use cases

1

An e-commerce team generates product photos on custom backgrounds without a photo studio

2

A marketing bot creates social media visuals from a campaign brief in Telegram

3

A design tool lets users edit uploaded photos — change color, remove objects, swap backgrounds

4

An indie app generates illustrations for blog posts and landing pages on demand

5

A SaaS onboarding flow produces custom avatar or cover images for new user profiles

6

An internal content pipeline batch-generates image variants for A/B testing ad creatives

Prompting tips

  • Describe composition first: what's in the foreground, what's in the background, and from which angle
  • Name the style and materials explicitly — photo, flat illustration, 3D render, matte plastic, brushed metal
  • State the light: soft daylight, studio softbox, neon, backlight — it changes mood more than color alone
  • Pick aspect by the job: 1:1 for feeds and avatars, 16:9 for banners and covers, 9:16 for stories and reels
  • For edits, say exactly what to change and what to keep, add «without …» for anything that must disappear

Real results

Works by Zerocoder users made with this model: preview, resolution, duration and date. Nothing was generated specifically for this page.

A cinematic, dreamlike AR visual featuring a central 151 photorealistic person s10
Ultra-realistic iPhone editorial photo of a stylish young man against a raw conc6
Apply a high-contrast black-and-white halftone print effect to this image, dense
Transform the uploaded image into a high-contrast monochrome particle-render aes6
Ultra-realistic RAW 8K HDR Apple × Dior × Vogue 2026 beauty guide. Use the uploa
ModelDateLikesPrompt
GPT Image 223 August 202610A cinematic, dreamlike AR visual featuring a central 151 photorealistic person surrounded by floating 3D Spotify/Apple Music interface cards
GPT Image 26 September 20266Transform the uploaded image into a high-contrast monochrome particle-render aesthetic. Subject reconstructed entirely from thousands of tin
GPT Image 223 August 20266Ultra-realistic iPhone editorial photo of a stylish young man against a raw concrete wall. Wearing an oversized beige cropped utility jacket
GPT Image 226 August 20260Ultra-realistic RAW 8K HDR Apple × Dior × Vogue 2026 beauty guide. Use the uploaded face as the ONLY identity reference. Preserve identity 1
GPT Image 223 August 20260Apply a high-contrast black-and-white halftone print effect to this image, dense dot-pattern shading with a glowing blue background bleed. D

FAQ

Is this the same model ChatGPT uses for images?

Yes, GPT Image is OpenAI's image model used in ChatGPT. Through the API you get the same quality without a ChatGPT subscription, paying per image.

Does the official OpenAI SDK work with GPT Image through Zerocoder?

Yes: set base_url to https://zerocoder.com/api/v1 and the zc-sk-… key; the rest of your code stays the same. Use images.generate for generation and /images/edits for editing.

How do I get a GPT Image API key?

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

How is GPT Image API billed?

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

What if GPT Image fails to generate the image?

If the provider fails a GPT Image generation, the charge is refunded automatically and the response carries refunded: true. You only pay for a finished image.

What are the GPT Image API rate limits?

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

Do I need a VPN or a foreign card for GPT Image API?

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

Can I try GPT Image without code?

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

AI API for your product

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