Getting started
Quick start
Five steps. You will have your first GPT Image 2 result in the next minute.
- Sign up for a fal key. Create one at fal.ai/dashboard/keys. Copy it now; you will not see it again.
- Export it.
export FAL_KEY=fal_...in your shell, or add it to a.env.local. Never commit it. - Pick a snippet. The three below hit the same endpoint (
fal-ai/gpt-image-2) with a minimal input derived from the default parameter set. - Run it. The first call takes a few seconds; subsequent ones are faster. You get a response URL pointing at a image.
- Iterate. Try the playground to see a chat-style interface, or jump to the API reference for every parameter.
First call
BASH
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 exa...","safety_tolerance":2,"size":"1024x1024","quality":"medium","num_images":1}'