Skip to content
OpenAIgpt-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

Pricing

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

GPT Image 2 pricing: the provider's list price and the Inferray price for each.
MetricList priceYou pay
Per generation$30 / 1M image tokens$24 / 1M image tokens

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 the API below — pick the one your code already speaks and just swap in your Inferray key.

/v1/images/generationsOpenAI-style Image Generation · openai SDK or plain HTTP
curl https://api.inferray.com/v1/images/generations \
  -H "Authorization: Bearer inferray_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "a quartz crystal on a workbench",
    "n": 1
  }'

More from OpenAI