Use the provider API

fal.ai exposes fal-ai/moss-image. Keep FAL_KEY on your server, submit to the queue, poll the request status, and fetch the completed result. This site’s generator endpoint is for its own interface; it is not a public developer API.

Reserve budget before submitting

Validate dimensions and prompt size before making a paid request. Reserve usage atomically, return a job token, and let the browser poll. Avoid blind retries after network failures: an upstream job may already exist even when your server did not receive the response.

Estimate image cost

The provider lists $0.05 per megapixel as checked on October 21, 2026. A 1024 × 1024 image is approximately $0.052 by linear pixel calculation. This is an estimate; actual billing and future prices are controlled by the provider.

Go to the source

Official references, checked October 21, 2026.

fal.ai API documentationCurrent provider pricing