Seedance 2.0 generations can take tens of seconds to a few minutes. For production use, prefer the queue API with either polling or a webhook instead of a long-lived HTTP connection.
import fal_client
handle = fal_client.submit(
"bytedance/seedance-2.0/fast/text-to-video",
arguments={"prompt": "..."},
webhook_url="https://your.app/webhooks/seedance", # optional
)
print(handle.request_id)import { fal } from "@fal-ai/client";
const { request_id } = await fal.queue.submit(
"bytedance/seedance-2.0/fast/text-to-video",
{
input: { prompt: "..." },
webhookUrl: "https://your.app/webhooks/seedance", // optional
}
);status = fal_client.status(
"bytedance/seedance-2.0/fast/text-to-video",
request_id,
with_logs=True,
)const status = await fal.queue.status(
"bytedance/seedance-2.0/fast/text-to-video",
{ requestId: request_id, logs: true }
);Possible statuses: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED.
result = fal_client.result(
"bytedance/seedance-2.0/fast/text-to-video",
request_id,
)
print(result["video"]["url"])const result = await fal.queue.result(
"bytedance/seedance-2.0/fast/text-to-video",
{ requestId: request_id }
);
console.log(result.data.video.url);If you supplied webhook_url on submit, fal.ai will POST the final payload to it when the job finishes — the body matches the normal result schema:
{
"request_id": "764cabcf-b745-4b3e-ae38-1200304cf45b",
"status": "COMPLETED",
"payload": {
"video": { "url": "https://.../output.mp4" },
"seed": 42
}
}Verify the request signature following fal.ai's webhook guide.