Capability
Text to ImageImage to Image
Weighted Discount
—
Price Rank #4 / 13
Billing Mode
Per Token
Quality × Resolution
Param Completeness
67%
API Doc Score 58/100
Well-wrapped custom SDK, multiple delivery modes, lacks error code docs
Pricing
| Quality \ Resolution | 1K | 2K | 4K |
|---|---|---|---|
| Low | $0.006 $0.006 | $0.012 $0.012 | $0.016 $0.016 |
| Medium | $0.053 $0.053 | $0.107 $0.107 | $0.139 $0.139 |
| High | $0.211 $0.211 | $0.428 $0.428 | $0.565 $0.565 |
Price unit: USD, official price from OpenAI public pricing (USD)
API
API Style
Custom SDKDelivery
SyncAsync (Polling)Async (Webhook)
SDK
@fal-ai/client
Output
urlbase64
Integration
Base URL
https://api.fal.aiEndpoint
POST
openai/gpt-image-2Auth
api-key-env
Content-Type
application/jsonRequest Parameters
| Name | Type | Required | Default | Values |
|---|---|---|---|---|
| prompt | string | required | — | — |
| image_size | string | optional | landscape_4_3 | square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9+1 |
| quality | string | optional | high | autolowmediumhigh |
| num_images | integer | optional | 1 | — |
| output_format | string | optional | png | jpegpngwebp |
| sync_mode | boolean | optional | — | — |
| image_urls | array | optional | — | — |
| mask_url | string | optional | — | — |
Operational
Response Metadata
Yes
Developer Experience
Code Examples
javascript
extracted_from: https://fal.ai/models/openai/gpt-image-2/api, https://fal.ai/models/openai/gpt-image-2/edit/api; i2i endpoint: openai/gpt-image-2/edit; supports subscribe/queue/stream modes; custom size {width,height} also supported; image metadata in response (width,height,file_name,content_type); FAL_KEY env var for auth