Menu

1 / 7

AI Gateway now supports asynchronous video generation - Vercel

Vercel News·Kevin Dawkins·5 days ago
#rA1hzo83
Reading 0:00
15s threshold

Video generation on AI Gateway can now run asynchronously.

By default, generateVideo keeps one HTTP request to AI Gateway open until the result is ready. Because video generation can take seconds or minutes, that request can exceed request timeouts.

With asynchronous generation, your application can receive a webhook, poll for completion, or start a generation and retrieve the result in a later request.

Choose an option based on whether your process can keep running and whether your application can receive webhooks:

Existing generateVideo calls continue to work as before. All four options support text-to-video, image-to-video, reference-to-video, and other video inputs.

Copy link to heading Upgrade the SDK

Install the latest versions of the AI SDK and AI Gateway provider:

pnpm add ai@latest @ai-sdk/gateway@latest

Copy link to heading Use asynchronous video generation

Copy link to heading Wait for completion in a Workflow

An easy way to consume the completion webhook is a Workflow SDK .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.