Playground/fal-ai/gpt-image-2
GPT Image 2Add your fal API key
To run GPT Image 2 live in this playground, add your fal API key in Settings. Your key stays in your browser and bills your own fal account.
Stored in localStorage. Never sent to us.
GPT Image 21.0
Add your fal API key in Settings to run live.
Integration
Ship GPT Image 2 into your own stack.
The playground above is the same endpoint you call in production. Below, three canonical code paths and the full input reference. Copy what matches your stack.
Endpoint
fal-ai/gpt-image-2imageTypeScript · @fal-ai/client
example.tsTS
1import { fal } from "@fal-ai/client";23fal.config({ credentials: process.env.FAL_KEY });45const { data } = await fal.subscribe("fal-ai/gpt-image-2", {6 input: {7 "prompt": "A dense East-Asian bodega storefront at dusk, hand-painted signs with the exact...",8 "safety_tolerance": 2,9 "size": "1024x1024",10 "quality": "medium",11 "num_images": 112 },13 logs: true,14});1516console.log(data);
Python · fal-client
example.pyPYTHON
1import fal_client23result = fal_client.subscribe(4 "fal-ai/gpt-image-2",5 arguments={6 "prompt": "A dense East-Asian bodega storefront at dusk, hand-painted signs with the exact...",7 "safety_tolerance": 2,8 "size": "1024x1024",9 "quality": "medium",10 "num_images": 111 },12 with_logs=True,13)1415print(result)
HTTP · queue.fal.run
example.shBASH
1curl -X POST "https://queue.fal.run/fal-ai/gpt-image-2" \2 -H "Authorization: Key $FAL_KEY" \3 -H "Content-Type: application/json" \4 -d '{ "prompt": "A dense East-Asian bodega storefront at dusk, hand-painted signs with the exact...", "safety_tolerance": 2, "size": "1024x1024", "quality": "medium", "num_images": 1 }'
Input parameters
| Key | Kind | Default | Options |
|---|---|---|---|
| prompt | text (required) | · | Primary generation input |
| size | select | 1024x1024 | Square 1024, Landscape 1536, Portrait 1536, Square 2048, Wide 16:9 (2048), Tall 9:16 (2048) |
| quality | select | medium | Low, Medium, High |
| num_images | select | 1 | 1 image, 2 images, 4 images |
| safety_tolerance | default | 2 | Sent with every request unless overridden. |
Full, authoritative schema at fal.ai/models/fal-ai/gpt-image-2/llms.txt.