AI Gateway startVideo webhookUrl: the same pattern on Sume

experimental_startVideo returns once the job is accepted and can call a webhookUrl. On Sume, send mode webhook with webhook_url and keep polling as backup.

4 min readSume
All posts

experimental_startVideo sends the start request and returns as soon as AI Gateway accepts the job; it takes a webhookUrl for webhook-driven completion. The Sume equivalent is a normal video submit with mode: "webhook" and a webhook_url: you get a 202 with the job id and polling URLs, then a terminal event is posted to your URL.

Vercel's side is from its video generation page and Sume's from Webhooks and Jobs and results, read 2026-10-01.

What does startVideo do on Vercel?

The page says it needs ai@7.0.76 or later and @ai-sdk/gateway@4.0.61 or later, takes the same options as experimental_generateVideo plus webhookUrl, and pairs with experimental_getVideoStatus, which makes one status request and returns pending, completed or error.

How do I do the same on Sume?

Submit with mode: "webhook" and a public HTTPS webhook_url. Sending webhook_url (or its alias callback_url) without a mode also gives webhook. The URL must be public HTTPS; localhost, private-network and non-HTTPS URLs are rejected.

curl https://api.sume.com/v1/videos \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "seedance-2",
    "prompt": "A serene mountain landscape at sunset",
    "mode": "webhook",
    "webhook_url": "https://example.com/hooks/sume"
  }'

How do the two map?

Vercel and Sume start-then-notify mapping, read 2026-10-01.
StepVercel AI GatewaySume
Startexperimental_startVideoSubmit with mode: "webhook"; 202 with job id
Completion pushwebhookUrlwebhook_url; events job.completed, job.failed, job.canceled
Check onceexperimental_getVideoStatusPoll status_url until terminal, then GET result_url

What must my receiver do?

Return any 2xx after durably storing the event. Network errors and non-2xx responses are retried, up to 10 attempts total, with a fixed delay between attempts and a 10s timeout per attempt. Use job_id as your idempotency key. The docs call delivery an optimization, not the only recovery path, so keep status_url polling available for events that never arrive. Verifying signatures is covered in signed webhooks.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume