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

C# HttpClient: submit a Seedance 2.5 job and poll until completed
A .NET top-level-statements script that posts a seedance-2.5 job to Sume, polls every 30 seconds, and stops on completed, failed or cancelled.

Sume default queue capacity: max(3, 5 x concurrency), checked per plan
Sume's default queue capacity is max(3, concurrency x 5). Checking the rule against Free, Pro, Startup and Scale, plus the org floor and the wave hint.

Edited script, same Idempotency-Key: 409 conflict on Sume TTS
Reusing an Idempotency-Key with a changed transcript returns 409 idempotency_conflict on Sume. How to key each script version so edits never collide.

Two failure channels in the Sume SDK: submit error vs failed job
A generateVideoV1 error means no job exists; a failed job means one did and billing was settled. Handle both channels in TypeScript without double-submitting.

Order id or payload hash? Choosing a Sume Idempotency-Key
An order-id key gives 409 idempotency_conflict when the prompt changes; adding a payload hash gives a new paid job. Choose on purpose, with Python.

Sume /v1/images returns 200 or 202: branch on the status code
A slow 4K or xhigh image request on Sume returns 202 with a job envelope, not the image body. A Python client that handles 200, 202 and 502 correctly.

terminal, result_ready or status: which check ends a Sume poll loop?
Stop on terminal, fetch on result_ready, branch on status. Three fields in the Sume status payload, three different jobs, and a Python loop that uses each once.

Kling motion control with mode webhook: a Python verifier for rotation
Submit a Kling 3.0 motion control job with mode webhook and verify the sume-v1 signature in Python, including the two-entry header during a secret rotation.

lyria-3-pro-preview vs Sume lyria-3-pro: which model string?
Google lists lyria-3-pro-preview at $0.08 per song. On Sume the Music Router id is lyria-3-pro, and a Google string fails with model_not_found.

POST /v1/images returns 200 or 202: one Python handler for Sume
Sume's image route blocks up to 30 seconds and returns 200 with images, or 202 with a job envelope. One handler that covers both and never double-submits.

Sume job webhook receiver in plain Python, no framework
A 30-line stdlib http.server receiver for Sume job webhooks: raw-body HMAC, 300-second window, rotation-safe header, refuses an empty secret, answers 204.

Read the motion clip length with video inspect before Kling duration
Kling motion control on Sume reserves money from the duration_seconds you declare. Probe the reference clip with video inspect first, so the number is measured.

Turn a shot list into Gemini Omni requests: Python on Sume
Submit every line of a shot list as its own Omni job with stable Idempotency-Keys, then poll them in one pass. Runnable Python and the cost of a 3-shot list.

No progress percent in Sume job events: what to log and show instead
Sume's job events are a public timeline of eight named events, not a progress feed. What each means, what to log, and what to show a user while a video renders.

Sume music job in Python: 30-second wait, then poll, one paid job
Submit a Lyria track to Sume Music Router with a 30-second sync wait, fall back to polling on timeout, and reuse one Idempotency-Key. Runnable Python.

Sume TTS without a language field: English default, Hangul fallback
What Sume TTS 1.0 does when you leave out language, why a Hangul-only script is the one fallback, and why you should set language yourself on every job.

Sume TTS sentence slices need wav or raw output, not mp3
Sume TTS returns per-sentence audio_url slices only for wav or raw output. With mp3 you get timings but no slices. The request that gets clips.

Sume video mode: async, sync, subscribe or webhook? Cost is the same
Mode only decides how you learn the outcome: all four create the same job at the same price. A decision table for web apps, workers and batch pipelines.

Sume webhook.test has no job_id: keep it out of your job table
The dashboard's Send test posts a signed webhook.test with no job_id. Route on event first, dedupe on job_id second, and no phantom job row appears.

Hackathon app on the Sume Free plan: 1 seat, 6 accepted jobs
A weekend demo on Free can have one job processing and five queued. How to design the UI, the retries and the demo script around that, with the real limits.

Which Sume speech endpoint: TTS 1.0, TTS Router, STT or Music?
A decision table for Sume's four audio endpoints: TTS 1.0, TTS Router, STT 1.0 and Music Router. Inputs, limits, ids and what each does not do.

aiohttp web server: verify a Sume webhook with await request.read()
An aiohttp 3.14 web handler that verifies the Sume HMAC on await request.read(), then calls request.json(). Exits on an empty secret and handles webhook.test.

Bottle: verify a Sume webhook with request.body.read()
A single-file Bottle 0.13 app that verifies the Sume webhook HMAC with request.body.read(), aborts 401 on a bad signature and exits on an empty secret.

Check GET /v1/videos/models before you pay: a Python validator
Read GET /v1/videos/models and reject bad duration, resolution or audio flags in Python before POST /v1/videos. Fewer 400s, no paid retries.

Elysia on Bun: verify a Sume webhook with parse: "text"
An Elysia route that checks the Sume HMAC signature on the raw string, refuses an empty secret, skips duplicates and answers webhook.test. Tested on Bun 1.4.

Price a mixed image batch first: endpoint pricing in Python
Read cost_usd from each Sume image endpoint and multiply by the count. 200 Grok, 50 Seedream 4.5 and 100 Flux 2 Pro images should total $11.25 before you spend.

FastMCP 4 client OAuth with Sume: request mcp:read, add write later
Use FastMCP's OAuth helper in Python to sign in to Sume's hosted MCP with mcp:read first, then ask for mcp:write only for the script that spends.

Grok Imagine returns one image per call: fan out 1,000 in Python
Grok Imagine on Sume takes n=1, so 1,000 images means 1,000 requests at $0.025 each, $25.00 in all. A short Python fan-out shows how to run them safely.

mulmo images and mulmo movie break on gpt-image-1: set a model now
mulmocast-cli issue 1605: the gpt-image-1 default breaks mulmo images and movie after Oct 23, 2026. Which files to change, and a Python call to Sume instead.

Agents SDK cache_tools_list: stale tools after you grant Sume Write
With cache_tools_list on, an OpenAI Agents SDK MCP server can keep an old tool list. After a Sume Write grant, call invalidate_tools_cache() to see paid tools.

X-OpenRouter-Idempotency-Key vs Sume webhook dedupe on job_id
OpenRouter's webhook dedupe key is job_id plus status. Sume says dedupe on job_id. A SQLite sample builds a job_id plus event key that skips replays.

Roda: verify a Sume webhook with r.body.read in config.ru
A Roda app in one config.ru that verifies a Sume webhook with OpenSSL HMAC and a length-checked secure compare. Aborts on an empty secret. Tested on Ruby 4.0.

Split a 31 or 61 second video into valid Sume jobs: Python by model
A 31 or 61 second video cannot be 30 s plus 1 s on Wan 3.0 or Seedance 2.5, since the last job is under the minimum. Split evenly with this Python script.

Submit 6 ad hooks in parallel in Python with one Idempotency-Key each
A Python script that submits six 3-second Omni hook jobs in parallel, each with its own Idempotency-Key so a retry replays the original job. Cost: $2.25.

How many video scenes fit in one Sume script_run? Ten
script_run allows at most 32 paid calls per run. At three paid calls per scene (voice, image, clip) that is ten scenes, with two calls to spare.

Platform presets in Python: build a Sume video request, refuse bad
A 28-line Python preset table for TikTok 9:16, TikTok 1:1 and Shorts ads that picks the lowest Seedance tier clearing the pixel floor and refuses bad lengths.

Tornado: verify a Sume webhook in a RequestHandler
A Tornado 6.5 RequestHandler that checks the Sume webhook HMAC on self.request.body, raises HTTPError 401 on failure and handles the webhook.test event.

Split a 181-second Reel into valid AI video jobs (even split)
Greedy 30-second jobs leave a 1-second tail no model accepts. An even split gives 7 Seedance 2.5 jobs or 19 Omni jobs. Python planner and prices at 720p.

Submit and poll a Sume video job from Rust with reqwest
Rust reqwest blocking client for Sume /v1/videos: submit a sume/auto job, poll until completed, print the download URL and usage.cost. Cargo features listed.

Call Sume video generation from Java 11 with HttpClient
Java 11 HttpClient against Sume /v1/videos: submit a sume/auto job, poll until completed, and see what a default 8-second clip costs. No SDK needed.

Filter /v1/videos/models for a request in Python: 12 s, 1080p, 9:16
Read supported durations, resolutions, ratios and audio from Sume's model listing and keep only ids that can run your request. A 25-line script that runs.

Sume video jobs in Go: net/http, a struct, and a poll loop
A Go program that submits a Sume video job with net/http, decodes the job into a struct, polls to completed, and prints the URL and cost in 30 lines.

Generate an AI video with curl and jq in one Bash script
One Bash script that submits a Sume video job with curl, polls until it finishes, and prints the file URL and the cost. A 6-second clip is 75 cents.

Submit a Sume video job from PHP with cURL: sume/auto and polling
Replace a Sora call in a PHP worker with Sume /v1/videos: submit with cURL, poll the job, read the download URL, and know what a default clip costs.

Go WaitGroup fan-out for Wan 3.0 submits: no mutex, clean -race
Submit 12 Wan 3.0 clips from Go with sync.WaitGroup and a 4-slot channel. Each goroutine owns one slice index, so no mutex. Runs clean under go run -race.

curl --json: submit a Wan 3.0 video to Sume in one flag
curl 7.82 and later has --json, which sets the body and the JSON headers for you. A Wan 3.0 submit with an Idempotency-Key, then a status poll with jq.

Bun and Deno load .env for a Sume script: Deno needs --allow-env
One submit script, three runtimes. Bun reads .env on its own; Deno needs --env-file plus --allow-env for each variable. Tested on Bun 1.4.0 and Deno 2.9.7.

size vs image_size vs aspect_ratio: which field wins on Sume images
On POST /v1/images, image_size beats aspect_ratio, size is a tier word that rejects WxH, and resolution is a tier. Which one to send per model.