falText to imageAvailable now

openai/gpt-image-2

openai/gpt-image-2 is a text to image tool from fal that runs in the background and returns images. Pay as you go from $0.0000065 per token, with one API key.

Try itfrom $0.0000065 / token

Pricing

Up to $0.18798 per run at the default inputs. quality: auto $0.18798, low $0.00546, medium $0.04719, high $0.18798. $39.00 per 1M image output tokens, $6.50 per 1M text input tokens. The final charge comes from usage.

Limits

Runs
In the background
Returns
image
Longest queue wait
3600s
Run deadline
1800s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
prompt requiredtext—The prompt for image generation
image_sizeJSONlandscape_4_3The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400.
backgroundone of
auto, transparent, opaque
autoBackground for the generated image
qualityone of
auto, low, medium, high
highQuality for the generated image. Use 'auto' to let the model pick the best quality for the prompt.
num_imagesnumber (whole)
1 to 10
1Number of images to generate
output_formatone of
jpeg, png, webp
pngOutput format for the images
output_compressionnumber (whole)
0 to 100
—Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'.
image_passthroughtrue or falsefalseSend reference images and masks without resizing or re-encoding, and return the provider's original image bytes and format. Requests use the direct OpenAI API. Masks must be PNGs with an alpha channel: transparent regions are edited, and dimensions must match the first reference.

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "openai/gpt-image-2",
    "input": {
      "prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
    }
  }'