Skip to content

Provider Templates

Provider templates let you integrate with popular AI APIs using a single provider field instead of writing custom polling configuration. AsyncQueue knows how to submit, poll, and collect results from each supported provider.

IDProviderDescriptionPoll IntervalMax Duration
falfal.aiImage and video generation3s10 min
replicateReplicateOpen-source AI models5s10 min
runwaymlRunwayMLVideo generation (Gen-3, Gen-4)5s10 min
lumaLuma AIDream Machine video generation5s10 min
elevenlabs-dubbingElevenLabsVideo/audio dubbing and translation10s30 min
stability-videoStability AIStable Video Diffusion10s10 min
Terminal window
curl https://api.asyncqueue.io/v1/providers

Returns all available templates with their full pollConfig objects.


Generate images and video with fal.ai models (Flux, Kling, Minimax, and more).

fal.ai returns status_url and response_url in the submit response. AsyncQueue uses these directly for polling and result fetching.

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://queue.fal.run/fal-ai/flux/dev",
"method": "POST",
"headers": {
"Authorization": "Key fal_your_key"
},
"body": "{\"prompt\": \"A cat riding a skateboard\", \"image_size\": \"landscape_16_9\"}",
"provider": "fal",
"onCompleteUrl": "https://your-app.com/api/image-ready"
}'

Status values: IN_QUEUE, IN_PROGRESS, COMPLETED

Result: Full model output fetched from the separate response_url.


Run any open-source model on Replicate (Stable Diffusion, Whisper, LLaMA, video models, and thousands more).

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictions",
"method": "POST",
"headers": {
"Authorization": "Bearer r8_your_replicate_token"
},
"body": "{\"input\": {\"prompt\": \"An astronaut riding a horse\"}}",
"provider": "replicate",
"onCompleteUrl": "https://your-app.com/api/prediction-ready"
}'

Status values: starting, processing, succeeded, failed, canceled

Result: The output field from the prediction response (typically an array of URLs for image models).


Generate video with RunwayML Gen-3, Gen-4, and Gen-4.5 models. RunwayML does not support webhooks, so polling is the only option.

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.dev.runwayml.com/v1/image_to_video",
"method": "POST",
"headers": {
"Authorization": "Bearer runway_your_key",
"X-Runway-Version": "2024-11-06"
},
"body": "{\"model\": \"gen4\", \"promptImage\": \"https://example.com/image.jpg\", \"promptText\": \"A timelapse on a sunny day\", \"duration\": 5}",
"provider": "runwayml",
"onCompleteUrl": "https://your-app.com/api/video-ready"
}'

Status values: PENDING, THROTTLED, RUNNING, SUCCEEDED, FAILED

Result: The output array (typically contains a video URL). Video URLs expire within 24-48 hours - download them promptly.


Generate video with Luma AI’s Dream Machine (Ray-2 model).

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.lumalabs.ai/dream-machine/v1/generations",
"method": "POST",
"headers": {
"Authorization": "Bearer luma_your_key"
},
"body": "{\"prompt\": \"A drone flyover of a mountain lake at sunrise\", \"model\": \"ray-2\"}",
"provider": "luma",
"onCompleteUrl": "https://your-app.com/api/video-ready"
}'

Status values: dreaming, completed, failed

Result: The assets.video field (a URL to the generated video).


Dub and translate video or audio content. Dubbing jobs can take several minutes depending on content length.

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.elevenlabs.io/v1/dubbing",
"method": "POST",
"headers": {
"xi-api-key": "el_your_key",
"Content-Type": "application/json"
},
"body": "{\"source_url\": \"https://example.com/video.mp4\", \"target_lang\": \"es\"}",
"provider": "elevenlabs-dubbing",
"onCompleteUrl": "https://your-app.com/api/dubbing-ready"
}'

Status values: dubbing, dubbed, failed

Result: The dubbing_id - use it to fetch the dubbed audio via GET /v1/dubbing/{dubbing_id}/audio/{language_code} on ElevenLabs’ API.


Generate video from images using Stable Video Diffusion.

Note: Stability AI uses HTTP status codes instead of JSON status fields. A 202 response means still processing, 200 means complete.

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: async_your_key" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.stability.ai/v2beta/image-to-video",
"method": "POST",
"headers": {
"Authorization": "Bearer sk-your-stability-key"
},
"body": "{\"image\": \"base64_encoded_image_data\", \"seed\": 42}",
"provider": "stability-video",
"onCompleteUrl": "https://your-app.com/api/video-ready"
}'

Status values: HTTP 200 (complete), HTTP 202 (in progress)

Result: The binary video content URL.


For AI APIs not in the template list, provide a custom pollConfig object instead of a provider name. See AI Provider Polling for the full pollConfig reference and template variable syntax.