Skip to main content
OpenAIMediumUltra

GPT Image 2

OpenAI's state-of-the-art image generation and editing model with strong instruction following, sharp text rendering, and detailed editing. Quality-based pricing lets you trade off cost vs. fidelity.

480 credits
per image (high/auto); 176 for medium, 45 for low
Strong prompt and instruction following
Sharp typography and text rendering
Image editing via input_images (composition/edit)
Quality tiers: low / medium / high / auto
Transparent or opaque background control

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

llms.txt

Quick Start

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "openai/gpt-image-2",
  "input": {
    "prompt": "A photorealistic close-up portrait of an elderly Japanese ceramicist with deep wrinkles and a warm smile, carefully inspecting a freshly glazed tea bowl in his rustic sun-drenched workshop.",
    "aspect_ratio": "3:2",
    "quality": "high",
    "output_format": "webp"
  }
}'

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes-A text description of the desired image
input_imagesarrayNo-Array of image URLs to use as input for editing or composition
aspect_ratiostringNo1:1Output aspect ratio
1:13:22:3
qualitystringNoautoQuality tier โ€” sharper but slower and more expensive at higher tiers
lowmediumhighauto
backgroundstringNoautoSet background mode (transparent backgrounds not supported)
autoopaque
output_formatstringNowebpOutput image format
webppngjpeg
output_compressionintegerNo90Compression level (0-100) for webp/jpeg output
moderationstringNoautoContent moderation level
autolow
number_of_imagesintegerNo1Limited to 1 โ€” call multiple times for batches

How to Provide File Input

There are 3 ways to provide files for the input_images parameter:

Recommended

Direct Upload (Multipart)

Attach files directly to POST /v1/predictions/upload. No separate upload step needed.

curl -X POST "https://api.core.today/v1/predictions/upload" \
  -H "X-API-Key: cdt_your_api_key" \
  -F "model=openai/gpt-image-2" \
  -F 'input={"prompt":"your prompt here"}' \
  -F "file:input_images=@your_file.png"

Image URL

Pass a publicly accessible URL directly. You can also use file_url from the Storage API.

{
  "model": "openai/gpt-image-2",
  "input": {
    "prompt": "your prompt here",
    "input_images": ["https://example.com/image.jpg"]
  }
}
See the File Upload docs for more upload methods including Presigned URLs.

Common Parameters

Common parameters used when calling POST /v1/predictions.

ParameterTypeRequiredDefaultDescription
modelstringYes-Model identifier
inputobjectYes-Object containing the model-specific parameters from the table above
output_folderstringNo-Folder path for output files (max 256 chars, '..' not allowed)
webhook_urlstringNo-Webhook URL to call on completion
is_publicbooleanNofalseIf true, output files are also available via permanent public URLs

Examples

Photorealistic Portrait

Generate a high-fidelity portrait with rich detail

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "openai/gpt-image-2",
  "input": {
    "prompt": "A photorealistic close-up portrait of an elderly Japanese ceramicist with deep wrinkles and a warm smile, carefully inspecting a freshly glazed tea bowl in his rustic sun-drenched workshop.",
    "aspect_ratio": "3:2",
    "quality": "high",
    "output_format": "webp"
  }
}'

Tips & Best Practices

1Use quality=low for cheap iterations, then re-render at high once happy
2Provide input_images to compose or edit existing visuals
3GPT Image 2 excels at images that require legible text
4Use 3:2 / 2:3 for cinematic or portrait orientation

Use Cases

Marketing visuals with legible copy
Photoreal portraits and product shots
Multi-image composition and edits
Concept art with strong text elements