pydo.async_invoke.create()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.async_invoke.create(
model_id="fal-ai/flux/schnell",
input={...},
tags=[...],
)Serverless inference methods can authenticate with a model access key instead of a DigitalOcean API token:
client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))Description
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.
Parameters
model_idstring requiredExample:
fal-ai/flux/schnellThe ID of the model to invoke asynchronously.
inputobject requiredThe input parameters for the model invocation. Fields vary by model type.
For image generation models (e.g.,fal-ai/flux/schnell,fal-ai/fast-sdxl), usepromptalong with optional image parameters likeoutput_format,num_inference_steps,guidance_scale,num_images, andenable_safety_checker.
For audio generation models (e.g.,fal-ai/stable-audio-25/text-to-audio), usepromptalong withseconds_totalto control the duration.
For text-to-speech models (e.g.,fal-ai/elevenlabs/tts/multilingual-v2), usetextwith the content you want converted to speech.Show child properties
promptstring optionalExample:
A futuristic city at sunsetThe text prompt describing the desired output. Used for image generation and audio generation models.
textstring optionalExample:
This text-to-speech example uses DigitalOcean multilingual voice.The text content to convert to speech. Used for text-to-speech models.
output_formatstring or null optionalExample:
landscape_4_3The desired output format or aspect ratio for image generation.
num_inference_stepsinteger or null optionalExample:
4The number of inference steps to use during image generation. More steps generally produce higher quality output but take longer.
guidance_scalenumber or null optionalExample:
3.5Controls how closely the image generation model follows the prompt. Higher values produce output more closely matching the prompt.
num_imagesinteger or null optionalExample:
1The number of images to generate.
enable_safety_checkerboolean or null optionalExample:
TrueWhether to enable the safety checker for generated content.
seconds_totalinteger or null optionalExample:
60The total duration in seconds for generated audio. Used for audio generation models.
tagsarray of objects or null optionalAn optional list of key-value tags to attach to the invocation request for tracking or categorization.
Show child properties
keystring requiredExample:
typeThe tag key.
valuestring requiredExample:
testThe tag value.
Request Sample
Response Example
More Information
See /v1/async-invoke in the API reference for additional detail on responses, headers, parameters, and more.