Image models
GPT Image 2 (High)
On this page
GPT Image 2 — fast, high-fidelity AI image generation & editing.
| modelId | gpt-image-2-text-to-image, gpt-image-2-image-to-image |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Gpt Image 2 Text To Image | gpt-image-2-text-to-image | POST /api/v1/generate | prompt |
| Gpt Image 2 Image To Image | gpt-image-2-image-to-image | POST /api/v1/generate | prompt |
| Poll task | — | GET /api/v1/task/{id}?model=gpt-image-2-text-to-image | — |
Gpt Image 2 Text To Image — gpt-image-2-text-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | Used to describe the generated images. Max 20000 characters. (example: Create a high-end Japanese avant-garde couture fashion editorial photograph, 4:5 aspect ratio, featuring the woman from the reference image. Keep her face,… — full value in the request example) |
| input_urls | string[] | No | Image for reference (image URL) |
| resolution | string | No | Image resolution (options: 1K | 2K | 4K) (default: 1K) |
| aspect_ratio | string | Conditional | when `resolution` is `1K`: For 2K and 4K resolution, the following aspect ratios are not supported: 5:4, 4:5, 3:1, 1:3, and 9:21. (options: auto | 1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 16:9 | 9:16 | 2:1 | 1:2 | 3:1 | 1:3 | 21:9 | 9:21 | 5:4 | 4:5) · when `resolution` is `2K`/`4K`: For 2K and 4K resolution, the following aspect ratios are not supported: 5:4, 4:5, 3:1, 1:3, and 9:21. (options: auto | 1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 16:9 | 9:16 | 2:1 | 1:2 | 21:9) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"gpt-image-2-text-to-image","input":{"prompt":"Create a high-end Japanese avant-garde couture fashion editorial photograph, 4:5 aspect ratio, featuring the woman from the reference image.\n\nKeep her face, identity, hairstyle, and overall appearance consistent with the reference image. Redesign only the outfit into a Japanese avant-garde couture style, inspired by traditional Japanese silhouettes, kimono construction, origami folds, layered fabric, asymmetrical forms, and contemporary Japanese architecture.\n\nThe outfit is highly sculptural and architectural, featuring dramatic geometric structures, exaggerated volumes, sharp folds, layered panels, and an innovative futuristic silhouette. Elegant yet unconventional, like wearable architecture. Do not use or reference any real fashion brands or copyrighted designs.\n\nPure black studio background. Add very subtle, translucent atmospheric smoke, softly drifting around the lower body and edges of the silhouette. The smoke should be thin, elegant, slightly hazy, and partially illuminated by the light, never obscuring the face or garment.\n\nUse one single hard key light only, creating dramatic highlights, deep shadows, and strong three-dimensional contours across the sculptural garment. High contrast, cinematic shadows, sophisticated Japanese noir atmosphere.\n\nAdd minimal editorial typography:\n“TOKYO NOIR”\nwith small secondary text:\n“BEYOND FORM”\n\nTypography should be elegant, minimalist, refined, and positioned like a luxury fashion magazine cover. No excessive text.\n\nUltra-realistic fashion photography, premium couture craftsmanship, detailed fabric texture, sophisticated composition, cinematic contrast, museum-like visual impact, luxury high-fashion magazine cover quality.\n\nNo logos, no real brand references, no watermark, no additional people.","input_urls":["https://you.bot/examples/grok-imagine-text-to-image.jpg"],"resolution":"1K","aspect_ratio":"auto"}}'Gpt Image 2 Image To Image — gpt-image-2-image-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | Used to describe the generated images. Max 20000 characters. (example: Create a 1K editorial cover treatment from the uploaded image. Keep the subject's face, pose and identity exactly as uploaded and restyle only the surroundings… — full value in the request example) |
| input_urls | string[] | No | Image for reference (image URL) |
| resolution | string | No | Image resolution (options: 1K | 2K | 4K) (default: 1K) |
| aspect_ratio | string | Conditional | when `resolution` is `1K`: For 2K and 4K resolution, the following aspect ratios are not supported: 5:4, 4:5, 3:1, 1:3, and 9:21. (options: auto | 1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 16:9 | 9:16 | 2:1 | 1:2 | 3:1 | 1:3 | 21:9 | 9:21 | 5:4 | 4:5) · when `resolution` is `2K`/`4K`: For 2K and 4K resolution, the following aspect ratios are not supported: 5:4, 4:5, 3:1, 1:3, and 9:21. (options: auto | 1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 16:9 | 9:16 | 2:1 | 1:2 | 21:9) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"gpt-image-2-image-to-image","input":{"prompt":"Create a 1K editorial cover treatment from the uploaded image. Keep the subject's face, pose and identity exactly as uploaded and restyle only the surroundings into a blue-hour rooftop at dusk, city lights soft behind. One hard key light from camera left, deep shadows, cinematic contrast. Add the words \"AFTER HOURS\" in a small refined sans-serif at the lower left. Ultra-realistic photography, visible fabric texture. No logos, no brand references, no watermark, no extra people.","input_urls":["https://you.bot/examples/grok-imagine-text-to-image.jpg"],"resolution":"1K","aspect_ratio":"auto"}}'