POST /v1/async-invoke
Generate Image, Audio, or Text-to-Speech Using fal Models. This endpoint starts an asynchronous job and returns a request_id. The job status is QUEUED initially. Use the request_id to poll for the result.
Servers
- https://api.digitalocean.com
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
input |
Object | Yes |
The input parameters for the model invocation. Fields vary by model type. For image generation models (e.g., For audio generation models (e.g., For text-to-speech models (e.g., |
input.prompt |
String | No |
The text prompt describing the desired output. Used for image generation and audio generation models. |
input.seconds_total |
Integer | No |
The total duration in seconds for generated audio. Used for audio generation models. |
input.text |
String | No |
The text content to convert to speech. Used for text-to-speech models. |
input.num_images |
Integer | No |
The number of images to generate. |
input.num_inference_steps |
Integer | No |
The number of inference steps to use during image generation. More steps generally produce higher quality output but take longer. |
input.output_format |
String | No |
The desired output format or aspect ratio for image generation. |
input.guidance_scale |
Number | No |
Controls how closely the image generation model follows the prompt. Higher values produce output more closely matching the prompt. |
input.enable_safety_checker |
Boolean | No |
Whether to enable the safety checker for generated content. |
tags[] |
Array | No |
An optional list of key-value tags to attach to the invocation request for tracking or categorization. |
tags[].key |
String | Yes |
The tag key. |
tags[].value |
String | Yes |
The tag value. |
model_id |
String | Yes |
The ID of the model to invoke asynchronously. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.