{"slug":"gpt-image-2","routeSlug":"gpt-image-2","name":"GPT Image 2","developer":"OpenAI","modality":"image","inferenceTypes":["txt2img","img2img"],"surface":"native-v2","infrastructure":"partner-cloud","planRequired":"premium","status":"test_model","tags":["External","Partner Cloud","Premium"],"description":"· Experimental · Partner model · Premium · Generate from a description, with a reasoning pass ahead of generation. The gain is clearest on prompts with several interacting constraints — a layout with specified positions, a scene with a set number of objects, or a design that has to carry a specific line of text. Output runs from 512px up to 2048px.","useCases":["Run GPT Image 2 via unified v2 jobs with free pre-run /price quotes","Partner-hosted flagship model accessible on Premium accounts"],"samplePrompt":"A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \"CALIBRE 7 - EXPLODED VIEW\", draughtsman precision, muted sepia and slate palette","pricing":{"unit":"Partner rate (estimated before run)","headlineRate":"Live estimate via /api/v2/quote","hasLiveQuoteEndpoint":true,"quoteEndpoint":"/api/v2/quote","isEstimated":true,"notes":"Partner external model (Premium plan required). Quote via /api/v2/quote returns an estimate (is_estimated: true); settled on completion."},"specs":{},"links":{"html":"https://runstage.dev/models/gpt-image-2","markdown":"https://runstage.dev/models/gpt-image-2.md","json":"https://runstage.dev/models/gpt-image-2.json","playground":"https://runstage.dev/playground?model=gpt-image-2"},"snippets":{"curl":"# 1. Free pre-run retail quote\ncurl -X POST 'https://runstage.dev/api/v2/quote' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gpt-image-2\",\"width\":1024,\"height\":1024}'\n\n# 2. Submit metered job\ncurl -X POST 'https://runstage.dev/api/v2/run' \\\n  -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{   \"model\": \"gpt-image-2\",   \"prompt\": \"A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \\\"CALIBRE 7 - EXPLODED VIEW\\\", draughtsman precision, muted sepia and slate palette\",   \"width\": 1024,   \"height\": 1024,   \"seed\": 42 }'\n\n# Optional: switch to image editing (img2img) by uploading multipart -F \"image=@input.png\"\n# curl -X POST 'https://runstage.dev/api/v2/run' -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" --form-string 'model=gpt-image-2' --form-string 'prompt=A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \"CALIBRE 7 - EXPLODED VIEW\", draughtsman precision, muted sepia and slate palette' -F \"image=@input.png\"\n\n# 3. Poll owner-scoped job result until status is \"done\" or \"failed\"\ncurl -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  'https://runstage.dev/api/v2/jobs/<request_id>'","typescript":"const headers = {\n  Authorization: `Bearer ${process.env.RUNSTAGE_API_KEY}`,\n  \"Content-Type\": \"application/json\",\n};\n\n// 1. Free pre-run retail quote\nconst quote = await fetch(\"https://runstage.dev/api/v2/quote\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n  body: JSON.stringify({\n  \"model\": \"gpt-image-2\",\n  \"width\": 1024,\n  \"height\": 1024\n}),\n}).then((r) => r.json());\nconsole.log(\"Quoted USD:\", quote.data?.price);\n\n// 2. Submit metered job\nconst job = await fetch(\"https://runstage.dev/api/v2/run\", {\n  method: \"POST\",\n  headers,\n  body: JSON.stringify({\n  \"model\": \"gpt-image-2\",\n  \"prompt\": \"A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \\\"CALIBRE 7 - EXPLODED VIEW\\\", draughtsman precision, muted sepia and slate palette\",\n  \"width\": 1024,\n  \"height\": 1024,\n  \"seed\": 42\n}),\n}).then((r) => r.json());\n\n// 3. Poll owner-scoped job status until terminal\nlet result;\nfor (let i = 0; i < 60; i++) {\n  result = await fetch(`https://runstage.dev/api/v2/jobs/${job.data.request_id}`, {\n    headers: { Authorization: headers.Authorization },\n  }).then((r) => r.json());\n  if ([\"done\", \"failed\", \"refunded\"].includes(result.data?.status)) break;\n  await new Promise((r) => setTimeout(r, 2000));\n}\nconsole.log(\"Status:\", result?.data?.status, result?.data?.result_url);","python":"import os, time, requests\n\nheaders = {\"Authorization\": f\"Bearer {os.environ['RUNSTAGE_API_KEY']}\"}\n\n# 1. Free pre-run retail quote\nquote = requests.post(\n    \"https://runstage.dev/api/v2/quote\",\n    json={\n    \"model\": \"gpt-image-2\",\n    \"width\": 1024,\n    \"height\": 1024\n},\n    timeout=15,\n).json()\nprint(\"Quoted USD:\", quote[\"data\"][\"price\"])\n\n# 2. Submit metered job\njob = requests.post(\n    \"https://runstage.dev/api/v2/run\",\n    headers=headers,\n    json={\n    \"model\": \"gpt-image-2\",\n    \"prompt\": \"A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \\\"CALIBRE 7 - EXPLODED VIEW\\\", draughtsman precision, muted sepia and slate palette\",\n    \"width\": 1024,\n    \"height\": 1024,\n    \"seed\": 42\n},\n    timeout=30,\n).json()\njob_id = job[\"data\"][\"request_id\"]\n\n# 3. Poll owner-scoped job status until terminal\nresult = None\nfor _ in range(60):\n    result = requests.get(f\"https://runstage.dev/api/v2/jobs/{job_id}\", headers=headers, timeout=15).json()\n    if result[\"data\"][\"status\"] in (\"done\", \"failed\", \"refunded\"):\n        break\n    time.sleep(2)\nprint(\"Status:\", result[\"data\"][\"status\"], result[\"data\"].get(\"result_url\"))"}}