Sora

gpt-image-2

Image APIHOT

GPT Image 2 API is built for production image generation workflows that need prompt-driven creation, reference image editing, and predictable API payloads. Use it to create campaign visuals, product shots, social creatives, and design mockups without leaving the SdanceAI generation flow.

The current integration exposes Text to Image and Image to Image variants with 1K, 2K, and 4K pricing tiers, plus common aspect ratios for square, vertical, horizontal, and portrait outputs.

Model Type:
Pricing

Lowest cost starts at $0.015/image

Selected model
Text to Image

1K: 3 credits - Text to Image - Fixed per generation

2K: 5 credits - Text to Image - Fixed per generation

4K: 8 credits - Text to Image - Fixed per generation

USD estimates use $0.005/credit with the best annual plan. Final billing follows the selected resolution and model variant.

Generate Image
New tasks appear here after you submit.
API Input

Core request fields

Use a compact payload for prompt, source images, aspect ratio, resolution, callback, and safety settings.

Request JSON
{
  "model": "gpt-image-2-text-to-image",
  "input": {
    "prompt": "A cinematic night city poster with neon reflections on a rainy street.",
    "aspect_ratio": "auto"
  }
}

Use Text to Image for generation

The playground, request sample, request fields, and pricing on this page follow the selected model type.

View detailed API docs

Open the full API documentation for endpoints, authentication, task polling, and payload details. /models/gpt-image-2.md

promptstringText prompt. Required, maximum 20,000 characters.
aspect_ratioenumThe aspect ratio of the generated image is set to auto by default. (auto, 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 2:1, 1:2, 3:1, 1:3, 21:9, 9:21)
resolutionenumImage resolution: Note: Images with a 1:1 aspect ratio cannot be converted to 4K images. Images with the aspect ratio set to "auto" or without a specified aspect ratio parameter will only be converted to 1K images; otherwise, the task will fail to create. (1K, 2K, 4K)
Capabilities

What GPT Image 2 API adds to your image workflow

The page follows the same API-first structure as the reference: test the model, understand the fields, then move into integration.

Text-to-image creation

Turn structured prompts into production-ready visuals for posters, ads, thumbnails, concept art, and product scenes.

Reference image editing

Use image inputs to preserve subject context while changing style, background, layout, lighting, or product presentation.

Resolution tiers

Select 1K, 2K, or 4K output tiers to balance iteration cost, preview quality, and final asset sharpness.

API-ready payloads

Work with model IDs, callback URLs, prompt text, input image URLs, aspect ratios, and resolution fields in one predictable request.

Quick Start

From prompt test to image API request

A direct path for teams that want to validate image quality before wiring generation into an app or content pipeline.

1. Choose a mode

Select Text to Image for new visuals or Image to Image when you want reference-guided edits.

2. Submit generation

Call the API with your account key, model ID, prompt, optional input image URLs, aspect ratio, and resolution.

3. Poll and use

Track the task until it succeeds, then use the generated image result in your app, campaign, or asset library.

Use Cases

What you can create with GPT Image 2 API

Use the API when your product needs repeatable, high-quality image generation rather than one-off manual exports.

Product hero images and e-commerce visuals
Social posts, thumbnails, and ad creatives
Poster, flyer, and campaign key art
Reference-based outfit, background, and style edits
Design mockups and visual concept exploration
Batch creative generation for content pipelines
Community Showcase

Successful GPT Image 2 generations from the community

Browse public GPT Image 2 outputs that finished successfully, then open any case to inspect the prompt, settings, and result.

View more
Production Notes

Built for real image API workflows

Account-gated execution

Users sign in, submit jobs, and consume credits through the existing SdanceAI generation flow.

Input image handling

Image to Image accepts source image URLs, so teams can keep references in their own asset pipeline while generating new variations.

Cost-aware resolution

Start with 1K for fast iteration, then move to 2K or 4K when the prompt and visual direction are ready.

FAQ

GPT Image 2 API questions

What is GPT Image 2 API best for?

It is best for prompt-based image generation and reference-guided image editing, including product visuals, ads, social creatives, posters, and design mockups.

What is the difference between Text to Image and Image to Image?

Text to Image starts from a prompt only. Image to Image uses one or more source image URLs plus a prompt, making it better for edits, variations, and reference-preserving workflows.

Which resolutions are available?

The current API configuration includes 1K, 2K, and 4K pricing tiers. Choose lower resolution for iteration and higher resolution for final assets.

Which aspect ratios can I use?

The available aspect ratios include auto, 1:1, 9:16, 16:9, 4:3, and 3:4. Match the ratio to your target channel before generating final assets.

How many input images can Image to Image use?

The configured image-to-image payload supports input image URL arrays, with up to 16 source images.

Where can I test it before integrating?

Use the playground on this page to test prompts, input image URLs, aspect ratio, resolution, and API payload behavior before moving into production.

Can I use GPT Image 2 API for commercial workflows?

This page is configured for production image workflows. For commercial use, review your account plan, credit balance, model availability, and applicable content policy requirements.

Does the API support callbacks?

Yes. The request schema includes an optional callback URL so your service can receive task completion notifications.

How should I manage cost?

Use 1K for prompt exploration and bulk drafts, then regenerate selected winners at 2K or 4K when you need sharper final output.

Can I edit existing product photos?

Yes. Use Image to Image with source image URLs and a prompt that describes the exact background, lighting, layout, or styling changes you need.

Start building

Turn GPT Image 2 into your image workflow

Open the generator, test a prompt or reference image, then use the API docs when you are ready to connect GPT Image 2 to production.

API-ready
workflow
1K-4K
resolution
16 images
references