GPT Image API: GPT Image 2, 2.5 & 2.6 Generator
Pricing
Pay per event
GPT Image API: GPT Image 2, 2.5 & 2.6 Generator
GPT Image API for OpenAI GPT Image 2, 2.5 and 2.6: text-to-image and image editing with reference images, up to 4K, real-time Standby API or bulk runs. Flat $0.04 per image at any size, failed images are free, no OpenAI key needed.
Pricing
Pay per event
Rating
0.0
(0)
Developer
newpo
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Features
Share
GPT Image API: generate and edit images with GPT Image 2, 2.5 and 2.6
GPT Image API is a focused text-to-image and image-editing API for OpenAI's GPT Image models: GPT Image 2, GPT Image 2.5 (Flare and Sunburst) and GPT Image 2.6 (Flare and Sunburst). Call it as a real-time REST endpoint (Apify Standby) and get an image link back in JSON, or run it in bulk with up to 1,000 prompts.
No OpenAI account or API key, no subscription: you pay a flat $0.04 per image at any size up to 4K, and failed images are free. Need Nano Banana (Gemini) or other model families too? Use the sister Actor AI Image Generator.
How much does a GPT Image API call cost?
One price: $0.04 per image, for every model, every size (1024×1024 up to 3840×2160) and for edits as well as generations. You are charged only for images that were generated and saved.
| Job | Cost |
|---|---|
| 1 product shot, 1024×1024 | $0.04 |
| 50 blog hero images, 1536×1024 | $2.00 |
| 20 prompts × 4 variations, 4K | $3.20 |
| 10 edits with 3 reference images each | $0.40 |
Normal runs add Apify's tiny start fee ($0.00005); Standby API requests are charged per image only. Set Maximum cost per run in the run options to cap a run: the Actor stops starting new images when the next one would go over, and the skipped prompts are listed in the dataset.
How does the price compare?
Other GPT Image actors on the Apify Store that need no API key of your own, with their per-image price at paid-plan rates (prices checked November 2026, from public Store listings; they vary by size, quality and plan):
| Model family | Other Store actors, all-in per image | This Actor, any size |
|---|---|---|
| GPT Image 2 / 2.5 | $0.017 to $0.13 | $0.04 |
| GPT Image 2.6 | $0.013 (1K, low quality only) to $0.10 | $0.04 |
"All-in" counts any model usage some actors bill separately through your Apify account on top of their own fee. The price here is a fraction of what some of the most-used image actors charge ($0.13 and up), and it does not change with size; a few smaller actors list lower prices for some sizes or quality settings.
Use as a real-time GPT Image API (Standby)
Besides normal runs, the Actor runs as an always-ready HTTP API (Apify Standby). Send one prompt, wait for the image (usually 20 to 60 seconds), get JSON with the image link back. Authenticate with your Apify API token. Base URL: https://newpo--gpt-image-api.apify.actor
GET or POST /generate, one prompt per request:
| Parameter | Meaning |
|---|---|
prompt | Required. What to draw (up to 8,000 characters). |
model | gpt-image-2 (default), gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2.6-flare or gpt-image-2.6-sunburst. |
size / customSize | Default 1024x1024; up to 3840x2160. Both sides multiples of 16, long side at most 3× the short side, 0.66 to 8.3 megapixels. |
imagesPerPrompt | 1 to 4 (default 1). |
referenceImageUrls | Up to 16 public image URLs (array in a POST body, comma separated in a GET) to edit or combine pictures. |
outputFormat | png (default), jpeg or webp. |
response | url (default) or b64_json to also get the image data in the response. |
Price: $0.04 per image delivered. A request that fails returns an error and costs nothing.
curl
curl -H "Authorization: Bearer $APIFY_TOKEN" \"https://newpo--gpt-image-api.apify.actor/generate?prompt=a+red+fox+in+a+snowy+birch+forest,+watercolor&size=1536x1024&outputFormat=jpeg"
Python
import requestsr = requests.post("https://newpo--gpt-image-api.apify.actor/generate",headers={"Authorization": f"Bearer {APIFY_TOKEN}"},json={"prompt": "Studio product photo of a ceramic mug, soft window light", "model": "gpt-image-2", "size": "1024x1024"},timeout=300,)print(r.json()["images"][0]["url"])
JavaScript (Node 18+)
const res = await fetch('https://newpo--gpt-image-api.apify.actor/generate', {method: 'POST',headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },body: JSON.stringify({ prompt: 'Minimalist lighthouse illustration at dusk', model: 'gpt-image-2.6-flare', size: '1824x1024' }),});const { images } = await res.json();console.log(images[0].url);
Response:
{"prompt": "a red fox in a snowy birch forest, watercolor","model": "gpt-image-2.6-flare", "modelName": "GPT Image 2.6 Flare","count": 1,"images": [{ "url": "https://api.apify.com/v2/key-value-stores/<storeId>/records/image-....jpg?signature=...", "size": "1254x1254", "format": "jpeg", "bytes": 518212 }],"chargedUsd": 0.04, "pricePerImageUsd": 0.04, "durationSec": 28}
Notes: set your HTTP timeout to at least 5 minutes (requests are cut off after 5 minutes; a request that cannot finish in time returns an error and is not charged). Standby is meant for one prompt at a time; for hundreds of prompts use a normal run, which processes prompts in parallel. The first request after a quiet period starts the container, which adds a few seconds. The size in the response is the real size of the file: GPT Image sometimes renders slightly larger than asked (for example 1254×1254 for a 1024×1024 request) at the same aspect ratio. Image links are kept in the Actor's storage for your plan's data retention period, so download what you need to keep.
How to generate GPT Image images in bulk
- Enter your prompts, one per line.
- Pick a GPT Image model (GPT Image 2 is the default).
- Pick a size and the number of images per prompt.
- Optional: add reference image URLs to edit or combine pictures.
- Click Start. Each image usually takes 30 seconds to 2 minutes; prompts run in parallel.
- Open the Images tab in the output, or download the dataset as JSON, CSV or Excel.
Input example
{"prompts": ["A watercolor painting of a red fox in a snowy birch forest at dawn","Minimalist flat illustration of a lighthouse at dusk, pastel colors, lots of empty sky for a headline"],"model": "gpt-image-2","size": "1536x1024","imagesPerPrompt": 2,"outputFormat": "jpeg"}
Input fields
| Field | What it does |
|---|---|
prompts | One or more prompts (up to 1,000). |
model | One of the five GPT Image models. Same price for all. |
size | auto, 1024x1024, 1536x1024, 1024x1536, 1824x1024 (16:9), 1024x1824 (9:16), 2048x2048, 2560x1440, 1440x2560, 3840x2160, 2160x3840. |
customSize | Any WIDTHxHEIGHT: both sides multiples of 16, long side up to 3840 px and at most 3× the short side, 0.66 to 8.3 megapixels. |
imagesPerPrompt | 1 to 10 variations per prompt, each charged. |
referenceImageUrls | Up to 16 public PNG, JPEG or WebP URLs (50 MB total). Turns each prompt into an edit. |
outputFormat | png (default), jpeg or webp. |
keyValueStoreName | Optional named key-value store to keep the images after the run's data retention period. |
How to edit images with GPT Image
Add public image URLs in referenceImageUrls and say what to take from each:
{"prompts": ["The mug from the first image on the wooden table from the second, soft morning light, product photo"],"model": "gpt-image-2.6-flare","referenceImageUrls": ["https://example.com/mug.png", "https://example.com/table.jpg"],"size": "1024x1024"}
Editing costs the same $0.04. Reference URLs are checked before anything is generated: a dead link or a non-image URL fails the run at once, naming the URL, and nothing is charged.
What do you get back?
One dataset row per image:
{"status": "succeeded","prompt": "A watercolor painting of a red fox in a snowy birch forest at dawn","promptIndex": 0,"imageIndex": 0,"model": "gpt-image-2","modelName": "GPT Image 2","imageUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/image-0001-1-<run>.jpg","size": "1536x1024","format": "jpeg","bytes": 532574,"chargedUsd": 0.04,"referenceImageUrls": [],"durationSec": 48,"error": null}
A prompt that fails gets a row with status: "failed", the reason in error, and chargedUsd: 0. The run's OUTPUT record sums it up: images made, failures and the amount charged.
Which GPT Image models can I use?
| Model id | Notes |
|---|---|
gpt-image-2 | The default. Requests can be served by GPT Image 2 or 2.5 at the same price. |
gpt-image-2.5-flare, gpt-image-2.5-sunburst | GPT Image 2.5. |
gpt-image-2.6-flare, gpt-image-2.6-sunburst | GPT Image 2.6. |
All five accept reference images. Only GPT Image models are served here: no other vendors' models.
What can you use it for?
- E-commerce product photos: packshots on white, lifestyle scenes and seasonal variants from one product photo.
- Marketing and social media: ad creatives, blog hero images, thumbnails, 9:16 story backgrounds.
- Bulk content: hundreds of illustrations from a spreadsheet of prompts, one run.
- Posters, logos and text in images: GPT Image models follow detailed instructions and render text well.
- Automation: call it from the Apify API, Make, Zapier, n8n or an AI agent and get image links back.
How to write good GPT Image prompts
- Say the subject, setting, style, lighting and camera or medium: "studio product photo, soft box light, 50 mm".
- Put text you want in the image in quotes: a poster that says "Grand Opening".
- With reference images, say what to take from each: "the logo from image 1 on the shirt in image 2".
Limits
- Images take about 30 seconds to 2 minutes each. Large batches run several images at once.
- Up to 10 images per prompt, 16 reference images, 1,000 prompts per run (Standby: 1 prompt, up to 4 images).
- Prompts are checked by the models' safety systems. Adult, violent or otherwise disallowed content is refused (and not charged).
- Only use reference images you have the right to use.
- Images in the run's default store are deleted after your Apify plan's data retention period. Download them or use
keyValueStoreName.
How to use it from Python, Node.js, Make, Zapier or n8n
from apify_client import ApifyClientclient = ApifyClient(APIFY_TOKEN)run = client.actor("newpo/gpt-image-api").call(run_input={"prompts": ["A watercolor fox", "A neon city at night"], "model": "gpt-image-2", "outputFormat": "jpeg"})for row in client.dataset(run["defaultDatasetId"]).iterate_items():print(row["status"], row["imageUrl"])
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('newpo/gpt-image-api').call({ prompts: ['A watercolor fox'], size: '1536x1024' });const { items } = await client.dataset(run.defaultDatasetId).listItems();
In Make, Zapier and n8n use the Apify app's Run Actor action with the input above, or an HTTP module against /generate with your token in the Authorization header.
FAQ
How do I call GPT Image through an API without an OpenAI key? Send GET or POST /generate to the Standby URL above with a prompt and your Apify token; the JSON response contains the image link. The model cost is included in the price.
Am I charged for failed images? No. Only images that were generated and saved are charged.
Does a bigger size cost more? No. Every size up to 4K costs $0.04.
What is the difference between GPT Image 2, 2.5 and 2.6? They are successive GPT Image versions with the same inputs and the same price here. Generate one prompt with several models and compare.
Can it edit images? Yes. Pass reference image URLs and describe the change. Editing costs the same as generating.
Can I use the images commercially? You own what you create, subject to the model providers' usage policies.
Is there a free trial? New Apify accounts include free monthly platform credit that you can spend on this Actor.
How long does an image take? Usually 20 seconds to 2 minutes.
Do you also offer Nano Banana or other models? Not here: this Actor serves GPT Image models only. AI Image Generator offers Nano Banana Pro and Nano Banana 2 as well.
Powered by Lovely Router: want these models in your own code? Its Images API serves GPT Image models through the OpenAI SDK at a flat price per image.