GPT Image 2
Generate from a prompt or edit references with model gpt-image-2. Compare resolution-based per-image pricing and the documented reference-input formats.
Image APIs
Compare GPT Image 2, GPT Image 2.5 Flare and Sunburst for image generation and reference-image editing. Review inputs, examples and model-specific pricing.
GPT Image 2 is billed per generated image by resolution. GPT Image 2.5 Flare and Sunburst are billed by actual text and image token usage.
Built for a specific job
Generate from a prompt or edit references with model gpt-image-2. Compare resolution-based per-image pricing and the documented reference-input formats.
Use model gpt-image-2.5-flare for generation or reference-image editing. References must be public HTTP(S) image URLs; usage is billed in text and image tokens.
Use model gpt-image-2.5-sunburst through the GPT Image 2.5 interface. Compare its own token rates and outputs with Flare on your task instead of assuming equal cost or quality.
Billing unit
GPT Image 2: USD per generated image. GPT Image 2.5: USD per million billable text and image tokens.
Operational limits
Send prompt and model to POST /openai/v1/images/generations. Reference-image editing uses image_urls on that same endpoint; do not substitute a multipart upload or an Images edits request.
GPT Image 2.5 accepts public HTTP(S) reference URLs, while GPT Image 2 has its own reference-input contract. Check model-specific size, quality, output format and image-count settings before reusing a request. Handle complete JSON or SSE according to the selected response mode.
Integration guides
Current catalog coverage
Compare API IDs, operations, providers, and prices. Check the catalog date and each operation's billing unit before estimating usage costs.
Generate images with GPT Image 2.
POST /openai/v1/images/generations Image generation / editing reference 1k
API Hop price
2k
API Hop price
4k
API Hop price
Generate images with GPT Image 2.5 Flare.
POST /openai/v1/images/generations Image generation / editing reference Official price
API Hop price Save 20%
Reference price - not independently verified. Check the publisher's current rates, billing units and applicable terms before comparing costs.
Generate images with GPT Image 2.5 Sunburst.
POST /openai/v1/images/generations Image generation / editing reference Official price
API Hop price Save 20%
Reference price - not independently verified. Check the publisher's current rates, billing units and applicable terms before comparing costs.
Request example
The example below generates a new image with GPT Image 2. For reference-image editing, add image_urls to the JSON generations request according to the selected model documentation. These examples describe integration, not measured image quality.
curl -X POST "https://api.apihop.ai/openai/v1/images/generations" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A precise product illustration","n":1}'const response = await fetch("https://api.apihop.ai/openai/v1/images/generations", {
method: "POST",
headers: {
Authorization: "Bearer <API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "gpt-image-2",
"prompt": "A precise product illustration",
"n": 1
})
});
const data = await response.json();
console.log(data);import requests
url = "https://api.apihop.ai/openai/v1/images/generations"
headers = {"Authorization": "Bearer <API_KEY>"}
payload = {
"model": "gpt-image-2",
"prompt": "A precise product illustration",
"n": 1
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
response.raise_for_status()
print(response.json()) Use the API base URL from your account documentation and replace the example placeholders. Send your API key in the Authorization header; never include it in a URL or committed file.