GPT Image 2 API
OpenAI GPT Image 2 via fal.ai — next-generation image model with 4K rendering and sharper text fidelity. Integrate this model via REST with endpoint docs, parameters, and code examples.
Get API Key
Create auth keys for apps and agents
See Usage
Track requests, credits, and logs
Buy Credits
Top up prepaid API capacity
API Endpoint
/api/v1/models/gpt-image-2/runTest This Model
Run a real request through the API pipeline and inspect the exact input and output your integration will handle. Uses your credits like any API call; failed runs are refunded automatically.
LLM.txt
For AI assistants
Copy this model's documentation into Claude, GPT, or any AI for instant integration help.
/llm/gpt-image-2.txtOpenAPI Spec
Swagger compatible
Import into Postman, Swagger UI, or generate client SDKs in any language.
/api/openapiParameters
Input parameters accepted by this model
| Parameter | Type | Default |
|---|---|---|
promptrequired | string | - |
image_size | enum | 1024x1024 |
quality | enum | high |
num_images | integer | 1 |
output_format | enum | png |
Supported Aspect Ratios
See also
Related endpoints on this model — you may need a different apiId for a different operation (e.g. image edit vs generation).
Example Outputs
Real outputs generated by this model
A cozy reading nook with a window seat, plush cushions, a steaming mug, rainy day outside the glass
A calm lavender field at sunset, rolling purple rows toward distant hills, dreamy golden light
A misty pine forest trail in early autumn, golden leaves, soft morning fog, landscape photography
A bowl of fresh ripe strawberries on a marble countertop, soft natural light, food photography
A vintage globe and stacked leather books on a wooden desk, warm library light, still life
A misty mountain valley at dawn, layered ridgelines, a winding river through pine forest, soft light
A cozy independent bookshop interior with warm lamplight and towering shelves, inviting reading nook
A delicate hummingbird hovering beside a trumpet flower, iridescent feathers, crisp macro photography
A playful golden retriever leaping into a lake to fetch a stick, water splashing, sunny summer day
A dramatic desert landscape with towering red rock arches under a star-filled night sky, long exposure
A charming Parisian cafe corner with a striped awning and flowers, cobblestone street, soft morning light
A vibrant coral reef alive with tropical fish and a sea turtle, crystal-clear water, sun rays underwater
A surreal floating island with waterfalls spilling into the clouds, fantasy landscape, golden light
A vintage typewriter on a desk beside a steaming coffee and an open notebook, warm cinematic lighting
A detailed steaming bowl of ramen with fresh herbs and a soft egg, overhead shot, appetizing food photography
A field of vibrant tulips stretching to a windmill on the horizon, bright blue sky, Dutch countryside
A snow-dusted log cabin glowing warmly in a pine forest at twilight, smoke from the chimney, peaceful
A rustic loaf of crusty bread and a glass of red wine on a wooden table, candlelit, moody food photography
A whimsical hot air balloon shaped like a whale floating over rolling green hills, dreamy pastel sky
An elegant modern living room with floor-to-ceiling windows overlooking a misty forest, warm natural light
A lone red sailboat on a calm turquoise sea at golden hour, minimalist composition, gentle reflections
A serene Japanese tea garden in spring, cherry blossoms drifting over a koi pond, soft morning light, highly detailed
A cozy attic art studio bathed in afternoon sun, canvases and brushes everywhere, warm dust motes in the light
A majestic snow leopard resting on a rocky Himalayan ledge, piercing eyes, crisp wildlife photography
a thrilling action sequence of a woman trying to find her favorite candy. The candy wrapper is purple with a pixelated dragon and reads "Pixel Dojo". The woman says "Gotta have that pixel dojo candy. with over 60 ai tools, it's basically zero calories."
Code Examples
Generate image — copy and paste to get started
curl -X POST "https://pixeldojo.ai/api/v1/models/gpt-image-2/run" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a watercolor fox",
"quality": "high",
"image_size": "1024x1024"
}'Response Format
Submit Response (202 Accepted)
{
"jobId": "job_abc123...",
"status": "pending",
"statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123...",
"creditCost": 5,
"creditsRemaining": 95,
"expiresAt": "2026-07-15T00:30:17Z"
}Completed Response
{
"jobId": "job_abc123...",
"status": "completed",
"output": {
"images": [
"https://temp.pixeldojo.ai/pixeldojotemp/1705930123-456789.png"
]
},
"creditCost": 5,
"expiresAt": "2026-07-15T00:30:17Z"
}