Run AI video jobs without holding one HTTP request open

Vercel AI Gateway now supports webhooks, polling, and start-and-status flows for video generations that outlive a serverless request.

The useful part

What you get from it

What it is

Vercel AI Gateway can now run video generation asynchronously. Instead of keeping one HTTP request open while a provider renders a video, an application can receive a webhook, poll with short status requests, or start a job and retrieve its result later.

The SDK supports four patterns: a durable Workflow SDK run, generateVideo with a webhook, generateVideo with polling, or separate startVideo and getVideoStatus calls. Existing synchronous generateVideo integrations continue to work.

Who it helps

This is useful for developers building video-generation features in serverless functions, queues, batch systems, or user-facing applications with strict request timeouts. The start-and-status path is particularly practical when rendering may take minutes or when another worker needs to collect the result.

How to evaluate it

Upgrade ai and @ai-sdk/gateway to their latest versions in a test branch. Start with one supported video model and compare the available completion patterns:

  • Use polling for a worker that can remain active but cannot expose a webhook.
  • Use startVideo when the caller must return immediately.
  • Use a verified webhook or Workflow SDK when completion should resume a durable process.

Test completed, failed, retried, and timed-out jobs. Confirm that job metadata can be serialized into your queue or database and that the final video is copied to storage you control.

Limits and risks

Several methods remain marked experimental in the SDK. Hosted result URLs can expire, and webhook receivers need authentication, replay protection, and idempotent processing. generateVideo webhooks require a shared token and store because that convenience path does not expose the job’s signing secret.

Provider moderation, retention, latency, regional availability, and generation limits still apply. Asynchronous execution prevents one long request from timing out; it does not make rendering instant or remove provider failures.

Access and pricing

The feature is available through Vercel AI Gateway and the current AI SDK packages. Vercel does not list one universal price for asynchronous jobs because generation costs depend on the selected video model and provider. Check the model page and Gateway billing configuration before production use.

Sources

Community

Discussion

Share practical experience, questions, or warnings with the community.

0

Sign in to join the discussion and vote on comments.

No comments yet. Start the discussion.
Keep exploring

More from this topic

More in Tools & Apps