List the Formats by Sume that return video, in Python
Call GET /v1/formats, page with next_cursor, and filter on the sume handle and io.output_kind to find ready-made video Formats. Standard library only.

GET /v1/formats returns the Formats your key's workspace owns and the ready-made Formats by Sume, with keyset paging. Filter on handle == "sume" and io.output_kind == "video" to list the catalog Formats that return video. The script below does that with only the Python standard library.
import json
import os
import urllib.request
BASE = "https://api.sume.com/v1/formats?limit=50"
def fetch(url: str, key: str) -> dict:
req = urllib.request.Request(url, headers={"Authorization": f"Bearer {key}"})
with urllib.request.urlopen(req) as resp:
return json.load(resp)
def main() -> None:
key = os.environ["SUME_API_KEY"]
url = BASE
found = []
while url:
body = fetch(url, key)
for f in body["data"]:
io = f.get("io") or {}
if f.get("handle") == "sume" and io.get("output_kind") == "video":
found.append((f["slug"], io.get("input_kind")))
cursor = body.get("next_cursor")
url = f"{BASE}&cursor={cursor}" if body.get("has_more") and cursor else None
for slug, kind in sorted(found):
print(slug, kind)
main()What the key needs
The key needs the formats:read scope. Keys created before the Format API-call trigger shipped do not carry it, and you cannot add scopes to an existing key, so create a new one in the dashboard. A personal key lists your personal Formats and the catalog. A team key lists that workspace's Formats (Format API).
Fields worth reading
Each item carries more than a name. These are the ones that decide whether you can call it.
| Field | Use it to |
|---|---|
| handle, slug | Build the address /v1/formats/{handle}/{slug}/runs |
| io.input_kind | Know the input: url, text, image or product |
| io.output_kind | Know the output: video, image or text |
| showcase | See a real output the Format produced, or null |
| generation_spend_cap_usd_micros | See the cap a run inherits if you name none |
Why the script guards against null
io and showcase are null for Formats saved before those fields existed. That means not declared, not takes no input. The script uses f.get("io") or {} so an older Format is skipped instead of crashing. For those Formats, read the description and the call sheet page instead.
From the list to a run
Once you pick a slug, read it with GET /v1/formats/sume/{slug} to see its description, then call POST /v1/formats/sume/{slug}/runs with an instruction and an input object. Any key with formats:write can call a catalog Format, and the run, its media and its spend belong to your key. A slug that is not in the catalog answers 404 format_not_found.
Run times are minutes, not seconds, so design for a webhook or a polling loop from the start (Create a run).
Sources
Related posts
More in Formats
- Python: find the Sume Format that takes your input and returns video
Page through GET /v1/formats and filter on the io profile (input_kind, output_kind) to pick a Sume Format by shape. Includes the null-io case.
- Micro-drama episode manifest as a Format output schema (strict rules)
Bind an output_schema to a Format run and get typed JSON: episode number, title and a SumeMediaFile video. Strict subset: object root, every property required.
- One bad item in a 100-item Format bulk request: 400, nothing runs
A Format bulk create validates every item first. One invalid item returns 400 with details.index and queues nothing.
- Smallest vertical video size that passes Google Ads and TikTok
Google lists 720x1280 as the vertical minimum, TikTok in-feed 540x960 and its app bundle 720x1280. One Timeline output size clears them all, with the table.
Written by Sume