Skip to content
OpenAI logo

GPT Image 2.6 Sunburst

Text-to-Image • OpenAI

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

OpenAI's most capable image generation and editing model. It accepts text and image inputs and produces images with low, medium, high, xhigh, max, and auto quality settings.

Model Info
Terms and Licenselink ↗
More informationlink ↗
Pricing
  • Input (per 1M tokens)$5.00
  • Cached input (per 1M tokens)$1.25
  • Input image (per 1M tokens)$8.00
  • Cached input image (per 1M tokens)$2.00
  • Output image (per 1M tokens)$30.00

Usage

const response = await env.AI.run(
  'openai/gpt-image-2.6-sunburst',
  {
    prompt:
      'A cutaway editorial illustration of a floating ocean research station during a storm, showing laboratories, hydroponic gardens, autonomous submersibles, and illuminated underwater cables, precise technical details, dramatic but realistic lighting',
    quality: 'max',
    size: '1536x1024',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-image-2.6-sunburst",
  "input": {
    "prompt": "A cutaway editorial illustration of a floating ocean research station during a storm, showing laboratories, hydroponic gardens, autonomous submersibles, and illuminated underwater cables, precise technical details, dramatic but realistic lighting",
    "quality": "max",
    "size": "1536x1024"
  }
}'
Technical Editorial Illustration
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/openai/gpt-image-2.6-sunburst/technical-editorial-illustration.png"
  }
}

Examples

Portrait WebP — Generate a portrait composition in WebP format
const response = await env.AI.run(
  'openai/gpt-image-2.6-sunburst',
  {
    prompt:
      'A fashion portrait of an astronaut botanist in a glass greenhouse on Mars, crimson dust visible through the windows, translucent fabric, delicate blue flowers in the foreground, soft rim light, sophisticated magazine photography',
    quality: 'xhigh',
    size: '1024x1536',
    output_format: 'webp',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-image-2.6-sunburst",
  "input": {
    "prompt": "A fashion portrait of an astronaut botanist in a glass greenhouse on Mars, crimson dust visible through the windows, translucent fabric, delicate blue flowers in the foreground, soft rim light, sophisticated magazine photography",
    "quality": "xhigh",
    "size": "1024x1536",
    "output_format": "webp"
  }
}'
Portrait WebP
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/openai/gpt-image-2.6-sunburst/portrait-webp.webp"
  }
}
Cinematic Reference Edit — Edit a reference image into a cinematic scene while preserving its main subject
const response = await env.AI.run(
  'openai/gpt-image-2.6-sunburst',
  {
    prompt:
      "Turn the reference drawing into a polished cinematic stop-motion scene. Preserve the character's face and red scarf, add a miniature train platform at night, warm station lights, shallow depth of field, handcrafted felt and paper textures",
    images: [
      'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAnklEQVR42u2XQRLAIAgD8/839i/26qFCACm0ozPe1KwcQsAoXvgcAABxpwFowl4QWITHxW0LCBhxVngF4gKIirMQyBRnIJAtrkE8AuwWnyFEgKzfS1UA+3sWTju3BGAu7gKYIfBW+Q/AAQgBeMCkt1wVsLZjcwUYG2Z9wGLHZitWk1DEisubUYt2XB5IWkSyFqG0RSxvMZi0Gc1+Ox3fm00ZJ5mGVtkAAAAASUVORK5CYII=',
    ],
    quality: 'high',
    background: 'opaque',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "openai/gpt-image-2.6-sunburst",
  "input": {
    "prompt": "Turn the reference drawing into a polished cinematic stop-motion scene. Preserve the character'\''s face and red scarf, add a miniature train platform at night, warm station lights, shallow depth of field, handcrafted felt and paper textures",
    "images": [
      "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAnklEQVR42u2XQRLAIAgD8/839i/26qFCACm0ozPe1KwcQsAoXvgcAABxpwFowl4QWITHxW0LCBhxVngF4gKIirMQyBRnIJAtrkE8AuwWnyFEgKzfS1UA+3sWTju3BGAu7gKYIfBW+Q/AAQgBeMCkt1wVsLZjcwUYG2Z9wGLHZitWk1DEisubUYt2XB5IWkSyFqG0RSxvMZi0Gc1+Ox3fm00ZJ5mGVtkAAAAASUVORK5CYII="
    ],
    "quality": "high",
    "background": "opaque"
  }
}'
Cinematic Reference Edit
{
  "state": "Completed",
  "result": {
    "image": "https://examples.aig.cloudflare.com/openai/gpt-image-2.6-sunburst/cinematic-reference-edit.png"
  }
}

Parameters

prompt
stringrequiredText prompt describing the image to generate or edit
quality
stringenum: low, medium, high, xhigh, max, autoQuality of the generated image
size
stringenum: 1024x1024, 1024x1536, 1536x1024, autoSize of the generated image. For gif output, the size of each frame.
background
stringenum: transparent, opaque, autoBackground transparency setting. Use transparent for images with no background, opaque for a solid background, or auto to let the model decide.
output_format
stringenum: png, webp, jpeg, gifOutput format for the generated image. Use gif for an animated GIF.
moderation
stringenum: auto, lowContent moderation level. Use low for less restrictive filtering, or auto for the default.
output_compression
integerminimum: 0maximum: 100Compression level from 0 to 100 for webp and jpeg output
complexity
stringenum: low, medium, highHow much the model plans the image before it renders it, separately from quality
frame_count
integerminimum: 2maximum: 16Number of frames, from 2 to 16, for gif output
frame_duration_ms
integerminimum: 20maximum: 9007199254740991Delay per frame in milliseconds, at least 20, for gif output
image
stringformat: uriURL to the generated image

API Schemas (Raw)

Input
Output

Was this helpful?