- You need to keep the connection open until receiving the result
- The request cannot be interrupted
- If the connection is interrupted there is not way to obtain the result
- You will be charged for the full request whether or not you were able to receive the result
| Endpoint | Method | Description |
|---|---|---|
https://fal.run/{model_id} | POST | Adds a request to the queue for a top-level path |
https://fal.run/{model_id}/{subpath} | POST | Adds a request to the queue for an optional subpath |
model_id: the model ID consists of a namespace and model name separated by a slash, e.g.fal-ai/fast-sdxl. Many models expose only a single top-level endpoint, so you can directly call them bymodel_id.subpath: some models expose different capabilities at different sub-paths, e.g.fal-ai/flux/dev. The subpath (/devin this case) should be used
Submit a request
Here is an example of using the curl command to submit a synchronous request:Object Lifecycle
You can control how long images and other objects generated by your request remain available by including theX-Fal-Object-Lifecycle-Preference header. This header allows you to specify the expiration duration for objects created during the request processing.
The header value must be a JSON object with an expiration_duration_seconds field specifying the number of seconds the objects should remain available:
Object LifecycleThe
X-Fal-Object-Lifecycle-Preference header applies to all objects (images, files, etc.) generated during request processing. If you need different expiration times for different requests, you can include this header with each request.