Queue-Based Processing
The queue system handles traffic surges gracefully and provides request tracking. When you submit a request, it enters a managed queue that ensures reliable processing even during peak demand.Automatic Retries
When using the queue, fal automatically retries requests that fail due to:- Server errors (503): The model endpoint was temporarily unavailable
- Timeouts (504): The request took too long due to transient issues
- Connection errors: Network issues between fal infrastructure
- Concurrency limit (429): When you reach your account’s concurrent request limit or a per-endpoint limit, the request waits in the queue until capacity is available. This wait does not count as a retry.
Automatic retries only apply to queue-based requests. Direct synchronous requests return errors immediately without retry.
X-Fal-No-Retry header, setting a start timeout with X-Fal-Request-Start-Timeout, and using client timeout to set a client-side deadline.
Backup Domains
Backup domains provide an alternative connection to the same inference API when a primary domain is unreachable.
Use the same API key, request path, query parameters, and body with the backup domain.
If your network restricts outbound connections, allow HTTPS access to both primary and backup domains.
Python Client
The Pythonfal-client tries the corresponding backup once if the primary connection fails or times out.
This applies to run(), submit(), subscribe(), queue operations, and stream(), including their async counterparts.
No configuration is required.
Raw HTTP Requests
For direct HTTP calls, replace the hostname when connection establishment fails. For example:Coverage
Python client fallback covers HTTP inference requests only. It does not cover WebSocket or realtime connections, or the separatefal.apps client.
Token requests to rest.fal.ai and uploads to v3.fal.media do not have backup domains.
Model Fallbacks
For supported models, fal can send a request to an equivalent endpoint when the primary endpoint is temporarily unavailable. The model app makes this decision for each request. It uses the fallback endpoint when the primary endpoint fails with a service error, a network error, or a timeout. This mechanism improves overall reliability and reduces the likelihood of failed requests. Fallbacks are enabled by default for all accounts. If you need to disable fallbacks for your account, please let your account team know. If you want to disable it per request, you can pass thex-app-fal-disable-fallback header. For any questions, contact our sales team.