AI Gateway async video 413 at 300 KiB: hosted URLs on Sume
AI Gateway caps the persisted video start request at 300 KiB and answers inline base64 with 413. On Sume, send public HTTPS URLs; 413 is payload_too_large.

Vercel AI Gateway persists the start request for an async video job and caps it at 300 KiB, which includes an 8 KiB allowance for attribution fields. Inline base64 images pass that ceiling quickly and fail with a 413 telling you to use hosted URLs. On Sume, send input media as public HTTPS image URLs; an oversized body returns 413 payload_too_large.
Vercel's limit is from its video generation page and Sume's codes from Errors and credits, read 2026-10-01.
When does the Vercel 413 happen?
The page says it applies when you pass inline base64 in prompt.image, frameImages or inputReferences. Text-to-video is unaffected. The fix it gives is a hosted URL, which "keeps the start request small enough to persist."
What does Sume return for a large request?
413 payload_too_large means the request body exceeds the configured API limit. A body that is not application/json returns 415 unsupported_media_type. The docs I read do not state a byte limit for /v1/videos, so do not assume Vercel's 300 KiB applies; check the 413 response and the docs for the endpoint you call.
| Status | Code | Meaning |
|---|---|---|
413 | payload_too_large | Request body exceeds the configured API limit |
415 | unsupported_media_type | Body was not application/json |
How do I send an image by URL on Sume?
Use frame_images with an image_url entry and a frame_type of first_frame or last_frame, as in the video docs. If Sume cannot fetch or mirror the media, the docs say to check that input media is a public HTTPS image URL, then retry or contact support with the request id.
{
"model": "seedance-2",
"prompt": "A character walking through a forest",
"frame_images": [
{
"type": "image_url",
"image_url": { "url": "https://example.com/first-frame.png" },
"frame_type": "first_frame"
}
]
}What about 413 from my own proxy?
A 413 can come from a platform in front of the API as well; see Vercel 413 and Sume video. Check the response body for a Sume error code to tell the two apart.
Sources
Related posts
More in Developers
- Vercel AI Gateway poll intervalMs and timeoutMs vs Sume polling
AI Gateway's poll option sets intervalMs (5000) and timeoutMs (600000). Sume jobs return next_poll_after_seconds, and your client owns the deadline.
- 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.
- Video starts on a black frame: fix the first Timeline segment
A render that opens on black usually has a fade or a late first clip. Timeline 1.0 refuses a first start other than 0 and any first-segment transition.
- Vimeo pixel aspect ratio 1:1: setsar in a video filter
Vimeo recommends square pixels (1:1). Sume's video filter allowlist includes setsar, setdar and scale, so a filtergraph can set the sample aspect ratio.
Written by Sume