Skip to content

GPT-Image ​

OpenAI's image generation model, good at complex prompt understanding, text rendering and multi-round refinement.

Endpoint ​

POST $URL/v1/images/generations

Supported Models ​

ModelPositioning
gpt-image-2-proHigh-quality image generation
gpt-image-2-plusEnhanced version

Request Example ​

bash
curl $URL/v1/images/generations \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-pro",
    "prompt": "A tech-inspired product poster with wireless earbuds in the center, dark blue gradient background, bold white text at the bottom: FUTURE SOUND",
    "n": 1,
    "size": "1024x1024"
  }'
python
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="$URL/v1")
resp = client.images.generate(
    model="gpt-image-2-pro",
    prompt="A tech-inspired product poster with wireless earbuds in the center, dark blue gradient background",
    n=1,
    size="1024x1024",
)
print(resp.data[0].url)
ts
import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: process.env.YOUR_API_KEY,
  baseURL: '$URL/v1',
})
const resp = await client.images.generate({
  model: 'gpt-image-2-pro',
  prompt: 'A tech-inspired product poster with wireless earbuds in the center',
  n: 1,
  size: '1024x1024',
})
console.log(resp.data[0].url)

Main Parameters ​

ParameterTypeRequiredDescription
modelstringYesgpt-image-2-pro / gpt-image-2-plus
promptstringYesImage description; include subject, style and text content
nintegerNoNumber of images
sizestringNoe.g. 1024x1024, 1792x1024, 1024x1792
qualitystringNostandard / hd

Notes ​

  • GPT-Image has strong text rendering ability, suitable for posters, covers and e-commerce main images.
  • Generated result URLs are temporary; please download and save promptly.

© 2026 Euno AI. All rights reserved.