OpenAI / Image generation
GPT Image 2
OpenAI's latest image generation model. Supports high-fidelity image generation and editing via the dedicated Images API.
Our discountYour discount
−10%off the official price−10%off the official priceUp to −10%off the official priceTier 3
Official $30.00Our price $27.00$27.00$27.00 / 1M image tokensTier 3: up to −10%

Per 1M image tokens
- Official
$30.00 - Tier 1 your tier$27.00−10%
- Tier 2 your tier$27.00−10%
- Tier 3 your tier$27.00−10%
- Enterprise rateBy quoteUp to 30% off
Try it in the console
Opens the console’s image mode with GPT Image 2 picked. Write your prompt there and press Generate.
Sign in to generate · $1 freeOpen in the consoleFailed runs are not charged
Sign in to run · $1 free credit · No card
Charged to your balance.
Tier 1 price, the price a new account pays.
01 · Learn
What is GPT Image 2?
GPT Image 2 is an image generation model from OpenAI on the OceanToken API, with structured outputs.
- −10%Our price vs official$27.00 / 1M image tokens · Official: $30.00
- text + imageInputOutput: image
- Up to 30% offEnterprise rate vs officialUp to, by quote
What GPT Image 2 can do.
- Image generation
- Guided by text promptsinput: text
- Works from reference imagesinput: image
GPT Image 2 in action
The things this model does best, each with an example picture.

AI-generated · made on the OceanToken API · Left: what was sent · right: the result One scene from several references
Give it photos of separate items and it arranges them into one new shot, each item still recognizable.

AI-generated · made on the OceanToken API Clean, readable text
Signs, labels and headlines come out spelled correctly and in the lettering style you ask for.

AI-generated · made on the OceanToken API Product photography
Clean, studio-style product shots with soft light, ready for online shops and listings.

AI-generated · made on the OceanToken API Photorealistic scenes
Landscapes and everyday scenes with natural light and believable detail.

AI-generated · made on the OceanToken API Illustration styles
From watercolor storybook art to flat graphics, it follows the art style you describe.
02 · Compare
Is GPT Image 2 cheaper than similar models?
The official price, then our price, for GPT Image 2 and the models most like it.
OfficialOur price
GPT Image 2OpenAI
$30.00$27.00−10%up to −30%Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)Google
$30.00$27.00−10%up to −30%
Per 1M image tokens. Prices as of November 27, 2026. Enterprise rate: quote by email, we activate it for you.
GPT Image 2 specs.
- Input
- text, image
- Output
- image
- Released
- June 24, 2026
Model ID and endpoint
- OceanToken model ID
openai/gpt-image-2- OpenAI-compatible base URL
https://api.oceantoken.ai/v1- Endpoint
POST /v1/images/generations
03 · Buy and build
How much does the GPT Image 2 API cost?
| Rate | Per 1M image tokens |
|---|---|
| Official | |
| Tier 1From sign-up | $27.00 |
| Tier 2$1,000 total | $27.00 |
| Tier 3$10,000 total | $27.00 |
| Enterprise rateBy quote | up to −30% |
Prompt cache and web search are billed at the official price, at every tier.
How tiers work
- Self-serveTier 1From sign-up
- Self-serveTier 2$1,000 total
- Self-serveTier 3$10,000 total
- By quoteEnterprise rateUp to 60% off, by quote
You pay per use from a prepaid balance, with no subscription. Official price: the model maker’s list price. Tier 1 to 3 are standing rates by total top-up.
How to use GPT Image 2 on OceanToken.
Three steps from no account to a working request. The same key and balance work for every model in the catalog.
Create an account and get an API key
One key works for every model your account can use.
Get API KeyAdd credits
OceanToken is prepaid: add credits, and each request is billed from that balance.
Add creditsCall GPT Image 2 from your code
Send a request to
See the API request in docsPOST /v1/images/generationswith the model IDopenai/gpt-image-2.
client.pyPythonfrom openai import OpenAI
# Your API Key from the OceanToken console
client = OpenAI(base_url="https://api.oceantoken.ai/v1",
api_key="YOUR_API_KEY")
result = client.images.generate(
model="openai/gpt-image-2",
prompt="A lighthouse on a cliff at dawn")
print(result.data[0].url or "image returned as base64")client.tsTypeScriptimport OpenAI from "openai";
// Your API Key from the OceanToken console
const client = new OpenAI({ baseURL: "https://api.oceantoken.ai/v1", apiKey: "YOUR_API_KEY" });
const result = await client.images.generate({
model: "openai/gpt-image-2",
prompt: "A lighthouse on a cliff at dawn",
});
console.log(result.data?.[0]?.url ?? "image returned as base64");request.mjsJavaScript// Your API Key from the OceanToken console
const KEY = "YOUR_API_KEY";
const res = await fetch("https://api.oceantoken.ai/v1/images/generations", {
method: "POST",
headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ model: "openai/gpt-image-2", prompt: "A lighthouse on a cliff at dawn" }),
});
const result = await res.json();
console.log(result.data[0].url ?? "image returned as base64");request.shcurl# Your API Key from the OceanToken console
curl https://api.oceantoken.ai/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-image-2",
"prompt": "A lighthouse on a cliff at dawn"}'main.goGopackage main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
// Your API Key from the OceanToken console
body := strings.NewReader(`{"model": "openai/gpt-image-2", "prompt": "A lighthouse on a cliff at dawn"}`)
req, _ := http.NewRequest("POST", "https://api.oceantoken.ai/v1/images/generations", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Main.javaJavaimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
// Your API Key from the OceanToken console
String body = "{\"model\": \"openai/gpt-image-2\", \"prompt\": \"A lighthouse on a cliff at dawn\"}";
HttpRequest req = HttpRequest.newBuilder(URI.create("https://api.oceantoken.ai/v1/images/generations"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
}
}request.phpPHP<?php
// Your API Key from the OceanToken console
$ch = curl_init("https://api.oceantoken.ai/v1/images/generations");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"model": "openai/gpt-image-2", "prompt": "A lighthouse on a cliff at dawn"}',
]);
echo curl_exec($ch);request.rbRubyrequire "net/http"
# Your API Key from the OceanToken console
uri = URI("https://api.oceantoken.ai/v1/images/generations")
req = Net::HTTP::Post.new(uri, "Authorization" => "Bearer YOUR_API_KEY", "Content-Type" => "application/json")
req.body = '{"model": "openai/gpt-image-2", "prompt": "A lighthouse on a cliff at dawn"}'
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.bodyGPT Image 2 API: frequently asked questions.
What is GPT Image 2?
OpenAI's latest image generation model. Supports high-fidelity image generation and editing via the dedicated Images API.
How much does GPT Image 2 cost?
GPT Image 2 costs $4.50 per 1M input tokens and $27.00 per 1M image output tokens. Cached input costs $1.25 per 1M tokens. That is 10% off the official price ($5.00 per 1M input tokens), for every account. Prices as of November 27, 2026, charged per use to your prepaid balance; the console always shows the current price.
What inputs and outputs does GPT Image 2 support?
GPT Image 2 takes text and image as input and produces images.
How do I call GPT Image 2 through the API?
Send requests to https://api.oceantoken.ai/v1/images/generations with the model ID openai/gpt-image-2 and your OceanToken API key. The API is OpenAI-compatible, so an OpenAI SDK needs only the base URL https://api.oceantoken.ai/v1 and your key. The same OceanToken API key works for every model your account can use. Full reference: docs.oceantoken.ai.
How do I top up?
OceanToken is prepaid. Open Credits in the console, choose an amount and pay by card on Stripe's hosted checkout page (Link works too). Your balance updates a few seconds after payment. Have a trial code? Redeem it on the same page.
Do credits expire, and can I get a refund?
Purchased credits are valid for 12 months from the date of purchase. Credits from trial codes, promotions or gifts may have a shorter validity. All purchases are final and non-refundable, except where the law requires a refund. Section 6 of the Terms of Service has the details.
Am I charged for failed requests?
No. If a request fails, you are not charged: that covers a request refused for an insufficient balance or by a safety check, one whose provider fails before returning any output, and a video job that fails or is refused by a safety check, whose held amount goes back to your balance. The one exception: if a request breaks off after the model has started producing output, for example a stream cut off part-way, you pay for the tokens that were processed and generated for it.
Related articles
More from OpenAI
- GPT Image 2.6 Sunburst
- GPT Image 2.6 Flare
- GPT Image 2.5 SunburstOur discount−10%
- GPT Image 2.5 FlareOur discount−10%
- All OpenAI models
Similar image generation models
- Nano Banana Pro (Gemini 3 Pro Image)Our discount−10%
- Nano Banana Pro (Gemini 3 Pro Image Preview)Our discount−10%
Same prompt, 8 models
One prompt, sent to each model through the OceanToken API on November 1, 2026. Every image is that model’s own output, only resized.
Prompt: “A matte white ceramic coffee mug with gentle steam rising, on a light oak table beside a sunny window, soft natural light, minimal clean product photography, no text, no logo”
Compare GPT Image 2 with other models.
Keep exploring
Sources
- OceanToken model catalog: every price, context window, input, output and parameter on this page (November 27, 2026).
- How tiers work: Tier 1 to 3 and the Enterprise rate.







