Blog

Developers

Building on the Sume API: keys and hosts, jobs and runs, polling, webhooks, idempotency, errors and rate limits, the SDK, the CLI, and MCP auth.

Start with: Sume API quickstart: your first video generation call in five steps

Which Sume timeout is which: sync, jobs_wait, waitForJob, webhooks

Sume's waits differ: 30 s sync cap, 50 s jobs_wait, a 20-minute SDK default in ms, 10 s per webhook attempt. A table of each unit and what expiry does.

sume models list is a deprecated alias: use sume catalog list

The Sume CLI keeps sume models list as a deprecated alias of sume catalog list. What the catalog command shows, what it cannot do, and how to migrate scripts.

Sume SDK function name for an endpoint: the camelCase operationId

GET /v1/catalog is listPublicApiCapabilities in @sume-com/sdk. Map any Sume route to its generated function from the OpenAPI operationId, with a table.

Lint a Format package in CI before you PUT it

A short Python check for a Sume Format package: SKILL.md name equals the slug, allowed folders and extensions, file names, 100 MiB limits. Run it before PUT.

Edit several Format files in one commit with a change set

One PUT to the Sume Format contents root commits many files at once. Learn what a change set keeps, why it cannot delete, and how If-Match guards the package.

Suno v6-wild is less predictable: how to keep a track on Sume

Suno describes v6-wild as less predictable. Sume Music has no seed, so you cannot rerun a track; keep the job result and its URL as the only master.

sume/auto hides which image model ran: pin an id for brand assets

model sume/auto never discloses the family, and job.model stays sume/auto. Why a brand asset set needs a pinned image model id, and how to pin one on Sume.

OpenRouter's video expired event has no Sume twin: one normalizer

OpenRouter sends completed, failed, cancelled and expired video events; Sume sends three job events. A Python normalizer and verifier for both.

One length gate for six ad platforms: caps table and Sume plan

Reels 15 min, Stories 60 min, TikTok 10 min, LinkedIn 30 min, Pinterest 5 min, Snap 180 s. Check one Sume Timeline length against all six with the plan call.

Twenty image jobs, one webhook: mode webhook plus a Python verifier

Submit 20 image requests with mode webhook, receive signed job.completed callbacks, and verify them in Python. Retries, replay window and the poll fallback.

Know the day Sume lists a new video model: a catalog check script

Vendors launch video models weekly. A short Python script reads GET /v1/videos/models and flags when an id or name appears, with exit codes for cron or CI.

List Sume's music and TTS router engines in Python before deploy

A short Python script reads the music and TTS router model lists so a deploy check can confirm your pinned engine ids and fixed prices still exist.

Grok Imagine ignores aspect_ratio on image-to-video; Sume rejects it

xAI says image-to-video output matches the input image and ignores aspect_ratio. Sume's Grok row goes further and rejects the field. Crop the still first.

TTS output_format: choose wav or mp3 for joins, captions and clips

Sume TTS returns mp3 by default. Choose wav when you will join, slice per sentence or feed lip-sync; mp3 is smaller but adds padding at every edge.

Port a fal queue submit and poll loop to Sume /v1/videos in Python

A fal queue client posts to queue.fal.run, polls a status URL and fetches a result. The Sume version is 21 lines of Python on /v1/videos. Field map, traps.

Grok Image on Sume: one image per call, so fan out four in Python

x-ai/grok-image lists n as 1 to 1 in the Sume catalog. How to get four variants with four parallel calls, what it costs, and how to stay under queue limits.

OpenRouter: poll video every 30 s. Sume: obey next_poll_after_seconds

OpenRouter recommends a 30 second poll on video. Sume's jobs API returns next_poll_after_seconds, else backoff. A Python poller that does both.

Sume Send test vs Redeliver: which to use for avatar video jobs

Send test posts a dummy webhook.test payload to a URL you type; Redeliver re-sends a real job's terminal event with a fresh signature. When to use each.

Ruby verifier for Sume avatar job webhooks (HMAC SHA 256)

A Ruby method that verifies Sume's x-sume-webhook-signature: HMAC SHA 256 over timestamp.body, any sume-v1 entry, five-minute window, empty secret refused.

Video-trim says unsupported_media_source: which Sume routes take URLs

Trim, filter and compose need a media.sume.com clip; upscale, STT, RMBG and captions take public HTTPS URLs. Imports take TikTok and Instagram. Read 2026-10-10.

Pick the cheapest Sume image row for a ratio and 3 refs (Python)

A 24-line Python script reads GET /v1/images/models and the endpoints route, filters by aspect ratio and reference count, and sorts by billed price.

Sume image 400 'does not accept aspect_ratio': read supported (Python)

When a Sume image row rejects aspect_ratio with 400 invalid_request, the error carries a supported array. This Python snippet picks the nearest listed ratio.

ElevenLabs dubbing output: mono v1, stereo v2, and Sume channels

ElevenLabs dubbing v1 returns mono and v2 at most stereo. On Sume, detach keeps source channels or mono, and a concat of mixed layouts fails by design.

A for await loop over Sume job status: one async generator, 3 runtimes

Wrap Sume status polling in an async generator and read it with for await. One fetch-only file ran unchanged on Node, Bun and Deno and honors the poll hint.

Is there a Sume API test mode? No sandbox key, but two hosts

Sume has no sume_test key. Use the dev host with its own key, cap each run with generation_spend_cap_usd, and mock the rest. What each option costs and covers.

openapi-fetch with Sume's OpenAPI JSON: a typed client in 20 lines

Generate types from Sume's reference JSON with openapi-typescript, then call it with openapi-fetch and an x-api-key middleware. A type-checked sample.

Tailscale Funnel for Sume webhooks: a public HTTPS URL for localhost

Sume webhook URLs must be public HTTPS, so localhost is rejected. Tailscale Funnel gives your dev machine one, plus a receiver that refuses an empty secret.

Test a Sume poll loop with node:test mock.timers, no real sleeping

Use node:test mock.timers to prove your poll loop waits next_poll_after_seconds, falls back to 2 s, and never polls early. A runnable test, no network.

Python 3.14 uuid.uuid7() as a Sume Idempotency-Key: when it is safe

uuid.uuid7() is new in Python 3.14 and makes a tidy Idempotency-Key for Sume submits, if you generate it once per intent and store it. A runnable stdlib sample.

uv run a single-file Python script against the Sume API (PEP 723)

A one-file Sume script with inline PEP 723 dependencies runs with uv run and no virtualenv. Submit, poll next_poll_after_seconds, print the result.

A circuit breaker for paid video API calls: cap, poll, cancel

Guard paid video generation with three layers: a per-run spend cap, a loop breaker in your code, and cancel. Sume charges for work done before a cancel.

Write a Sume video URL back to a CMS record: what to store

Sume media URLs in a finished run are durable and public. Store them on your CMS record, and proxy or copy them if you need per-customer access control.

Grok Imagine Lite's 10 requests per second vs Sume plan concurrency

xAI lists a 10 requests per second limit and Batch API for Grok Imagine 1.5 Lite. On Sume, a clip batch is bounded by plan concurrency and queue capacity.

Sume API 401 on the dev host: keys only work on their own host

A Sume key works only on the host it was created for. A key from api.sume.com gets 401 on api.dev.sume.com and the reverse. Match key, host, and env var.

Move a Vidu Q4 job to Sume: six fields to check before you submit

Vidu Q4 Preview's image-to-video fields (duration, resolution, start image, audio) mapped to Sume's /v1/videos names, with a Python filter for rows that fit.

Fit an AI voiceover to a target length with Sume TTS speed 0.6 to 1.5

To hit a target duration, generate once, measure the audio, then set generation_config.speed to measured over target, clamped to Sume's 0.6 to 1.5 range.

Sume TTS 400 tts_language_script_mismatch: Korean encoding check

Sume TTS rejects language ko when the transcript has no Hangul syllable: 400 tts_language_script_mismatch, no charge. Usually the text was decoded wrongly.

ElevenLabs 8 kHz mu-law and A-law vs Sume TTS pcm_mulaw, pcm_alaw

For phone-line audio, ElevenLabs lists 8 kHz mu-law and A-law. Sume TTS 1.0 offers pcm_mulaw and pcm_alaw in a raw container at 8000 Hz.

Scribe accepts MP4 and MOV; Sume STT needs an audio URL: detach first

ElevenLabs Scribe takes video files such as MP4 and MOV directly. Sume STT wants a public HTTPS audio_url, so a video goes through audio detach first at $0.01.

Sume STT words[] cap: what words_truncated and words_total mean

Sume STT returns word timings capped at 20,000 entries and sets words_truncated and words_total when it hits the cap. A 600-second job stays far below it.

Silent reference clip: stt_skipped_silent, no-audio and caption errors

A silent clip does not fail a Sume reference ingest, and STT settles to zero. Video inspect and captions do raise errors on silence.

Veo 3.1 request on Sume: 720p, 4, 6 or 8 seconds, in Python

A working POST /v1/videos call for veo-3.1-lite with 6 seconds, 9:16 and no audio, the rates for the three Veo rows, and what Sume rejects.

How do I ask Sume for 2K? Only 5 of 19 image rows list resolution

Only Nano Banana 2.1, Nano Banana Pro, Imagen 4 Ultra, Ideogram 4.5 and Soul list a resolution field. Send it to FLUX, Seedream or GPT and you get a 400.

Sume webhook URL localhost returns 400: test with a tunnel

Sume refuses localhost, private ranges, and plain HTTP webhook URLs with a 400 at create. Use a public HTTPS tunnel and verify the signature.

A sensor for a Sume Format run: poll, back off, time out

Poll a Sume Format run with a doubling backoff up to 60 seconds and a hard deadline. Here is the loop, the terminal states, and a 45 minute limit.

Which language does Lyria 3.5 sing in? Spanish prompt on Sume Music

Google says Lyria generates music in the language of your prompt. On Sume, write the brief in the language you want sung; no language field exists on Music.

Prove a Sume retry makes one job: drop the response on purpose

A 28-line fake server creates the job, then hangs up before replying. A stable Idempotency-Key leaves one job; a fresh key per retry leaves two. Runs anywhere.

How many Format runs per minute can my Sume plan start?

Sume limits writes per minute by plan, from 120 on Free to 1200 on Scale, with reads at 40 times that. Read the rate-limit headers and back off on 429.