Skip to content
OpenAIImagegpt-image-2

GPT Image 2

OpenAI's image model for generation and editing.

GPT Image 2 generates and edits images with strong prompt adherence, and takes reference images as input for edits and variations.

  • Prompt adherence
  • Image editing
  • Product imagery

Model details

Context window
272K tokens
Max output
128K tokens
Input
Text, images
Output
Images
Capabilities
Vision
Interfaces
OpenAI-style Image Generation, Image editing

Pricing

What each generation costs. The Cloakray price is what you are charged — no gateway fee is added on top of it.

GPT Image 2 pricing.
MetricPrice
/ 1M input tokens$5
/ 1M cached input tokens$1.25
/ 1M image input tokens$8
/ 1M image output tokens$30
/ 1M cached image input tokens$2

Why teams pick it

  • Follows detailed prompts closely
  • Edits and extends existing images
  • Large context for long, specific prompts

Call GPT Image 2

GPT Image 2 answers on any of the APIs below — pick the one your code already speaks and just swap in your Cloakray key.

/v1/images/generationsOpenAI-style Image Generation · openai SDK or plain HTTP
curl https://api.cloakray.com/v1/images/generations \
  -H "Authorization: Bearer ckr_..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A quartz crystal on a workbench"
}'
/v1/images/editsImage editing · openai SDK or plain HTTP
curl https://api.cloakray.com/v1/images/edits \
  -H "Authorization: Bearer ckr_..." \
  -F 'model=gpt-image-2' \
  -F 'prompt=Make the background blue' \
  -F 'image=@input.png'

More from OpenAI