Vidu Q4 base64 images and a 20 MB body vs Sume's HTTPS URLs

Vidu accepts base64 images with a 20 MB request body cap. Sume wants a public HTTPS URL. Base64 math, and a small check before you submit.

4 min readSume
All posts

Vidu Q4 Preview accepts images as base64 or as URLs and caps the HTTP body at 20 MB. Sume's video endpoints take reference and frame images only as public HTTPS URLs, so a base64 string is rejected. Host the file first, then send its URL.

What do the Vidu pages say about image size?

Both Vidu Q4 Preview pages list the same body ceiling. The image-to-video page adds a per-image limit.

Vidu Q4 Preview image input limits (Vidu pages read 2026-10-09)
ItemImage-to-videoReference-to-video
Images per request1 start frame1 to 15
FormatsPNG, JPEG, JPG, WebPPNG, JPEG, JPG, WebP
EncodingBase64 or URLBase64 or URL
Per-image size50 MBnot stated on the page
HTTP body20 MB maximum20 MB maximum

Why does base64 hit the 20 MB body sooner than you expect?

Base64 turns every 3 bytes into 4 characters, so the encoded text is about one third larger than the file. A single 15 MB image becomes roughly 20 MB of JSON, which is the whole body budget, even though the file is under the 50 MB per-image limit. With 15 reference images the cap bites at about 1 MB per image.

What does Sume want instead?

Sume's API reference says generation requests accept fetchable public HTTPS media URLs. It rejects localhost, private-network and non-HTTPS addresses before it submits anything. The same page notes that responses that are not images are rejected for image fields. There is no body-size problem to plan around, because the request carries only the URL.

How do you check a URL before you submit?

This small check mirrors the two rules above and prints the base64 size for a file you were about to inline.

from urllib.parse import urlparse

def b64_size(n_bytes):
    return 4 * ((n_bytes + 2) // 3)

def public_https(url):
    u = urlparse(url)
    return u.scheme == "https" and bool(u.hostname) and u.hostname not in ("localhost", "127.0.0.1")

print(b64_size(15 * 1024 * 1024) / 1024 / 1024, "MiB as base64")
print(public_https("https://example.com/a.png"), public_https("data:image/png;base64,AAAA"))

Reference limits per model are in the video generation docs.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume