Theme
Supported Models
If you discover more interesting models on the official website, please contact the administrator to add them
| Model | Description |
|---|---|
| fal-ai/flux-1/dev | Image generation |
| fal-ai/flux-1/dev/image-to-image | Image generation |
| fal-ai/flux-1/dev/redux | Image generation |
| fal-ai/flux-1/schnell | Image generation |
| fal-ai/flux-1/schnell/redux | Image generation |
| fal-ai/flux-pro/kontext | Image generation |
| fal-ai/flux-pro/kontext/max | Image generation |
| fal-ai/flux-pro/kontext/max/multi | Image generation |
| fal-ai/flux-pro/kontext/max/text-to-image | Image generation |
| fal-ai/flux-pro/kontext/multi | Image generation |
| fal-ai/flux-pro/kontext/text-to-image | Image generation |
Fal-ai API Documentation
Convention
IncludeAuthorization: Bearer your-keyin the header
The official website usesAuthorization: key your-key
Replace the officialhttps://queue.fal.runwith your request domain
Input, output, and request methods are consistent with the official website
1. Create Task
Endpoint
POST {{BASE_URL}}/fal-ai/{{model}}Example
For specific request methods, please refer to the documentation for each model. Please note that request parameters may not work correctly during forwarding. You can start testing from the prompt parameter. If you discover that a parameter in the documentation does not work properly, you can contact customer service for maintenance.
Response Body
{
"status": "IN_QUEUE",
"request_id": "551a32da-52b2-4be8-bf2f-bfb7cce2b324",
"response_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324",
"status_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/status",
"cancel_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/cancel",
"queue_position": 0
}Note
Theresponse_urlin the response body is the next request URL. You need to replacehttps://queue.fal.runwith your forwarding address.
2. Get Task Result
Results have a time limit. Please be sure to save them
Endpoint
GET {BASE_URL}/fal-ai/{modelname}/requests/{request_id}Example
Response Body - Images
Results are in images
{
"images": [
{
"url": "https://v3.fal.media/files/rabbit/aQEmU4lEKKIIr9cDOChUB.png",
"width": 1024,
"height": 768,
"content_type": "image/png"
}
],
"timings": {
"inference": 1.2249955059960485
},
"seed": 920212137,
"has_nsfw_concepts": [false],
"prompt": "Extreme close-up of a single cat eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"openai-hk\" is painted over it in big, white brush strokes with visible texture."
}Response Body - Video
Results are in video
{
"video": {
"url": "https://v3.fal.media/files/lion/eSsTNfWQRXfWGim1B8ZL5_output.mp4",
"content_type": "video/mp4",
"file_name": "output.mp4",
"file_size": 946834
}
}Results have a time limit. Please be sure to save them