# GPT Image 2 > GPT Image 2.0, OpenAI's latest image model, is capable of creating extremely detailed images with fine typography. ## Overview - **Endpoint**: `https://api.runflow.io/v1/run/openai/gpt-image-2` - **Model ID**: `openai/gpt-image-2` - **Provider**: OpenAI - **License**: commercial - **Last Updated**: 2026-04-21 ## Pricing - **Base price**: $0.133/image - **Note**: High quality (default) ## Input Schema ### `prompt` (string, required) The prompt for image generation ### `num_images` (integer, optional) Number of images to generate - **Default**: `1` - **Min**: 1 - **Max**: 4 ### `output_format` (string, optional) Output format for the images - **Default**: `png` ### `image_size` (string, optional) The 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. - **Default**: `landscape_4_3` ### `quality` (string, optional) Quality for the generated image - **Default**: `high` ### `sync_mode` (boolean, optional) If `True`, the media will be returned as a data URI and the output data won't be available in the request history. - **Default**: `false` ## Usage Examples ### cURL ```bash curl -X POST https://api.runflow.io/v1/run/openai/gpt-image-2 \ -H "Authorization: Bearer $RUNFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A professional headshot, soft studio lighting", "output_format": "png" }' ``` ### Python ```python import requests response = requests.post( "https://api.runflow.io/v1/run/openai/gpt-image-2", headers={"Authorization": "Bearer RUNFLOW_API_KEY"}, json={ "prompt": "A professional headshot, soft studio lighting", "output_format": "png", }, ) data = response.json() print(data["images"][0]["url"]) ``` ### JavaScript ```javascript const response = await fetch( "https://api.runflow.io/v1/run/openai/gpt-image-2", { method: "POST", headers: { "Authorization": "Bearer RUNFLOW_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "A professional headshot, soft studio lighting", output_format: "png", }), } ); const data = await response.json(); console.log(data.images[0].url); ``` ## Additional Resources - [Playground](https://www.runflow.io/models/openai/gpt-image-2) - [API Reference](https://www.runflow.io/models/openai/gpt-image-2/api) - [Documentation](https://docs.runflow.io) - [OpenAPI](https://api.runflow.io/v1/openapi.json)