YouTube wants JPG or PNG; Recraft V4 on Sume returns WebP only

YouTube's thumbnail page names JPG or PNG. Recraft V4 on Sume lists only WebP, so convert it with Pillow and stay under the 2 MB mobile cap.

5 min readSume
All posts

If you generate a YouTube thumbnail with Recraft V4 on Sume, you will get a WebP file, because that is the only output format the model lists in Sume's catalog. YouTube's thumbnail help page names JPG or PNG as its example formats, so convert the WebP to JPEG (or PNG) yourself before you upload, and check the size against the 2 MB mobile limit.

This is a small mismatch but a real one: the thumbnail looks fine in a browser, and the problem only shows up at the upload step. The fix is a few lines of Pillow, shown below.

What each side says

On the YouTube side, the page describes thumbnails for videos, Shorts and podcasts, and says the supported image formats are things like JPG or PNG. It also sets 2 MB as the limit for video thumbnails uploaded on mobile, and 50 MB on desktop for video, Shorts and podcast thumbnails. WebP is not named in the text I read, so I would not rely on it being accepted.

On the Sume side, the Image API docs say each model's output_format descriptor is published in the catalog, and that a parameter a model does not list is rejected with 400 unsupported_parameter rather than ignored. In Sume's catalog row for Recraft V4 the only listed output format is webp, the model is text-to-image only, and it does not accept reference images. The fal page for the model lists $0.04 per image and describes it as production-ready for brand systems; it does not describe a JPG option.

Output formats by Sume image model family (catalog and docs read 2026-10-03)
ModelFormats you can requestNotes
Recraft V4webp onlytext-to-image only
ChatGPT Image 2.5, Nano Banana 2 and Pro, Seedream, Flux 2, Qwen Imagepng, jpeg, webppick jpeg for YouTube
Ideogram 4.5none listedoutput format is chosen by the provider
Higgsfield Soulnone listeddocs describe PNG, chosen by the provider

Convert and shrink in one pass

Sume's docs also say output_compression (0 to 100 for JPEG and WebP) is in the schema but not served in v1, so you cannot ask the API to compress for you. Compression is therefore your step. The function below downloads the Sume-hosted image, flattens it to RGB, and tries JPEG qualities from 92 down to 60 until the bytes fit under 2,000,000, which is slightly under 2 MB so you do not argue about whether a megabyte is 1,000,000 or 1,048,576 bytes. If nothing fits, it raises, and the right response is to resize rather than to drop quality further.

import io
import requests
from PIL import Image


def webp_to_jpeg(url, limit=2_000_000):
    raw = requests.get(url, timeout=60).content
    img = Image.open(io.BytesIO(raw)).convert("RGB")
    for quality in (92, 85, 78, 70, 60):
        buf = io.BytesIO()
        img.save(buf, "JPEG", quality=quality, optimize=True)
        if buf.tell() <= limit:
            return buf.getvalue(), quality
    raise ValueError("still over the limit: resize first")


# url = the data[0]["url"] from your Recraft V4 response
# jpeg, quality = webp_to_jpeg(url)
# open("thumb.jpg", "wb").write(jpeg)

Or pick a model that already returns JPEG

If the look you need does not depend on Recraft, the simplest route is a model whose descriptor lists jpeg. Request it with output_format: "jpeg" and skip the conversion. Read supported_parameters from GET /v1/images/models first, as the docs advise, rather than assuming a format is available.

Download the image soon after generation, too. Sume returns Sume-hosted URLs rather than inline base64, so keep your converted JPEG as the file you actually publish.

Whichever route you take, open the final file once at its real upload size. A WebP-to-JPEG conversion can band in smooth gradients at the lower qualities, and a thumbnail with large flat color areas shows that first. If you see it, resize the image slightly smaller and keep the quality higher instead of the reverse.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume