What you keep
Your client stays on the OpenAI Images API. You change the base URL and the key, not the shape of the request. The public rate is per image, in 1K, 2K, and 4K tiers, so you can read the current figure before you send. Use this block and the pricing page.
Image public unit prices
| Model | Billing item | USD rate |
|---|---|---|
gpt-image-2 | 1K | $0.08 / image |
gpt-image-2 | 2K | $0.10 / image |
gpt-image-2 | 4K | $0.15 / image |
Public USD retail rates. The server renders the public price list of 2026-11-25 (Beijing time); the page refreshes them on load. Actual charges are on the Usage page.
What to send
The OpenAI column is from the model page and the image generation reference, read on 2026-11-25. The APIrove column is from this site’s catalog and the example on the model page. Fields marked unconfirmed are not documented here as accepted.
| Item | What to send |
|---|---|
| Model ID | gpt-image-2. OpenAI’s model page marks this ID and the snapshot gpt-image-2-2026-04-21 as Deprecated. The APIrove catalog still lists it on sale. |
| Base URL | https://apirove.com/v1 |
| Endpoint | POST /v1/images/generations. OpenAI says Chat Completions and Responses are not supported for this model. OpenAI lists v1/images/edits as supported; whether APIrove accepts that route is unconfirmed. |
| Input / output | OpenAI: text and image in, image out. |
| Prompt length | OpenAI’s generate method: up to 32000 characters. |
Count n | OpenAI: 1 to 10, default 1. The example on this site uses 1. |
| Size | The example on this site uses 1024x1024. OpenAI also says gpt-image-2 accepts WIDTHxHEIGHT, with both edges divisible by 16, an aspect ratio between 1:3 and 3:1, and a maximum of 3840x2160. Resolutions above 2560x1440 are experimental there. Whether every one of those size strings is accepted on APIrove is unconfirmed. |
| Response | OpenAI: GPT image models return base64 and do not support a URL. The example on this site reads data[0].b64_json. |
| Omitting model | That does not select GPT Image 2. The current default is gpt-image-2.6-flare. |
How to call it
Set the key in the shell. Do not paste it into source code. The fields match the example on the model page. Authentication is also covered in the OpenAI-compatible API guide.
export APIROVE_API_KEY='YOUR_API_KEY'
curl https://apirove.com/v1/images/generations \
-H "Authorization: Bearer $APIROVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A red ceramic cup on a pale desk, soft daylight","size":"1024x1024","n":1}'
With the OpenAI Python SDK, change base_url and the key:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["APIROVE_API_KEY"],
base_url="https://apirove.com/v1",
)
result = client.images.generate(
model="gpt-image-2",
prompt="A red ceramic cup on a pale desk, soft daylight",
size="1024x1024",
n=1,
)
image_base64 = result.data[0].b64_json
Check the HTTP status, confirm b64_json is present, then decode it and write a PNG. Do not write the whole JSON out as an image file. OpenAI also documents quality, background, output_format, and stream. Whether APIrove accepts those fields is unconfirmed. Check usage with the four-field request above first.
If you want the models named in OpenAI’s current image guide, gpt-image-2.5-flare and gpt-image-2.5-sunburst are on sale here. Requests that omit model use gpt-image-2.6-flare.
Sources
- OpenAI model page for gpt-image-2
- OpenAI: Create image
- OpenAI image generation guide
- APIrove model page
- Default image model when model is omitted
- API key security
Can I call the GPT Image 2 API today?
Yes. The APIrove catalog lists it on sale. Send model id gpt-image-2. OpenAI’s model page marks that same id Deprecated. That is OpenAI’s status, not a removal on this site.
What base URL and endpoint do I use?
Set the base URL to https://apirove.com/v1 and POST /v1/images/generations. Do not send gpt-image-2 to a chat endpoint. OpenAI says this model does not support Chat Completions or Responses.
Does omitting model still select GPT Image 2?
No. Image requests that omit model currently use gpt-image-2.6-flare. Set gpt-image-2 when you want this model.
Which field holds the image?
OpenAI says GPT image models return base64 and do not support a URL. The example on this site reads data[0].b64_json. Confirm the field is present, then decode it and write a file.
How is it billed, and which extra fields are unconfirmed?
Billing is per image at the published 1K, 2K, and 4K tiers. Read the pricing page and the price block on this page. Whether APIrove accepts quality, background, output_format, stream, or the edits route is unconfirmed. Start with 1024x1024 and n set to 1.
Which key should I use?
A text-group key can generate images, according to the docs. Confirm on the keys page that this key can call image models. Keep the key on the server.