Runflow
Back to Gallery

openai/gpt-image-2

GPT Image 2.0, OpenAI's latest image model, is capable of creating extremely detailed images with fine typography.

$0.133/image 2026-04-21

Install

pip install requests

Run the model

import requests

response = requests.post(
    "https://api.runflow.io/v1/run/gpt-image-2",
    headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
    json={
    "prompt": "A hand-drawn storefront sign reading 'CIRCUIT & GRAIN — specialty coffee' on ..."
    },
)

data = response.json()
print(data["images"][0]["url"])

Input schema

ParameterTypeDescription
promptstringThe prompt for image generation
num_imagesintegerNumber of images to generate
output_formatstringOutput format for the images
image_sizestringThe size of the generated image. Supports preset names or explicit {width, height}. Both dimensions must be multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400.
qualitystringQuality for the generated image
sync_modebooleanIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.

Output schema

FieldTypeDescription
outputsjsonUnified output array.
seedjsonSeed used for generation, or null.
timingjsonProvider timing info, or null.
nsfw_detectedjsonNSFW flag, or null.

Related models

Start generating with GPT Image 2

Get API access in minutes. No GPU setup, no infrastructure to manage.