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.

Valibot safeParse on a Sume job status: keep polling on bad data
Valibot's safeParse returns a result instead of throwing, so a malformed Sume status body can be logged and retried. A short schema and runnable code.

Video Router aliases first_frame_url, last_frame_url, duration_seconds
Three Video Router fields are aliases: first_frame_url for image_url, last_frame_url for end_image_url, duration_seconds for duration. Use the canonical names.

Video Router sync waits 30 seconds; your Seedance 2.5 clip keeps going
mode sync and subscribe are the same bounded wait of at most 30 seconds. A long Seedance 2.5 job returns 2xx with the current state; poll, do not resubmit.

Windmill run_wait_result vs a Sume async submit: pick one per job
Windmill advises async mode and offers run_wait_result for short jobs. Sume mirrors that split: async submit plus polling for long work, sync only for short.

Windmill sync returns 200 on error: check Sume's failed flag too
Windmill's sync webhook returns HTTP 200 with the error as JSON by default. Do not trust the status code alone for Sume jobs: read terminal, failed and sync.

40-clip montage Reel: how Timeline chunks a render past 12 slots
Timeline 1.0 accepts up to 200 slots and chunks automatically past 12; forcing single is refused. What that means for a fast-cut Reel and its $0.10 per minute.

Batch the shots of a micro-drama episode in Python, safe to re-run
A 25 line Python script submits an episode's Seedance 2.5 shots with one Idempotency-Key per shot and a job ledger, so a crash and re-run never double-bills.

Bun 1.4.1 Bun.serve: a Sume webhook receiver on raw bytes
A Bun.serve routes handler that reads the request as bytes, verifies x-sume-webhook-signature, refuses an empty secret, and returns 2xx only after the check.

Check an episode against TikTok upload specs before you post
TikTok's media guide lists MP4/H.264, 360 to 4096 px a side, 23 to 60 FPS and a 4GB cap. Use Sume video inspect to read your file's probe before uploading.

Deno 2.9 Deno.test.each: a case table for a Sume webhook verifier
Deno 2.9 adds Deno.test.each. Table-test a sume-v1 verifier: valid, rotated, empty secret, stale timestamp and tampered body, with WebCrypto only.

Elixir 1.20: verify a Sume webhook with :crypto.mac
An Elixir module that checks the Sume sume-v1 header with :crypto.mac and a guard clause that refuses an empty secret. Written against Elixir 1.20.4.

Episode idempotency keys: season, episode and version for Sume runs
Build the Sume Idempotency-Key from series, season, episode and a version you bump on purpose. What replays, what conflicts, what needs a new key.

Genkit createMcpHost: connect the hosted Sume MCP server
Genkit's createMcpHost takes a url and requestInit headers for remote servers. Wire https://mcp.sume.com/mcp into ai.generate and close the host after.

Go webhook handler: verify the Sume sume-v1 signature
A stdlib Go verifier for x-sume-webhook-signature: HMAC-SHA256 over timestamp.raw_body, five-minute window, constant-time compare, empty secret refused.

JDK 27 Java webhook verifier for Sume (HmacSHA256)
Verify a Sume sume-v1 webhook with javax.crypto and MessageDigest.isEqual on JDK 27: raw body bytes, five-minute window, empty secret refused.

Kotlin 2.4.20 allDistinctBy: unique Idempotency-Keys per batch
Kotlin 2.4.20 adds allDistinctBy. Use it to assert one Idempotency-Key per intent before a batch of Sume image submits, then post with java.net.http.

LM Studio mcp.json: add Sume's hosted MCP server with an API key
LM Studio 0.3.17 and later accept remote MCP servers in mcp.json. The exact entry for https://mcp.sume.com/mcp with a Bearer header, plus the gates to know.

Microsoft Agent Framework hosted MCP tool for Sume (Python)
Attach https://mcp.sume.com/mcp to an Agent Framework agent with get_mcp_tool, allowed_tools and approval_mode. Foundry runs the calls, so mind the key.

Node 22.23.3: pace Sume status polls with ratelimit headers
Read ratelimit-remaining, ratelimit-reset and retry-after from every Sume response in Node 22.23.3 and slow a wave of job polls before a 429 appears.

Node 22.23.3 fetch: retry a Sume submit with one Idempotency-Key
Node 22.23.3 LTS bundles Undici 6.28.1. A fetch submit loop that retries 429 and 5xx with one Idempotency-Key so a retry never bills twice.

PWA manifest icons: any, maskable and monochrome from AI images
Make the three PWA icon purposes with the Sume image API: transparent, full-bleed maskable and one-color monochrome masters, plus the cost of each.

Reel judders after mixing 24 and 30 fps clips: set Timeline output fps
Timeline repeats or drops frames when output fps differs from a source. Learn output_fps_resamples_sources, how the default is chosen, and when to pin 30.

Re-render a Short's ending without double billing: Idempotency-Key
A Timeline render needs an Idempotency-Key. Reuse a key to retry the same request; use a new key when you change the ending.

Short ends before the voice: timeline_gap_filled and last-frame hold
When Timeline clips cover less than the audio, you get a held last frame and a warning, not an error. The two codes, and how to fix them before upload.

Swift 6.4 CryptoKit: verify a Sume webhook signature
Verify x-sume-webhook-signature in Swift with CryptoKit HMAC<SHA256>: timestamp window, comma-separated entries, constant-time compare, empty secret refused.

YouTube Shorts export settings: 1080x1920 and fps in a Timeline render
A Sume Timeline render defaults to 1080x1920, a vertical Shorts frame. You can set fps to 24, 25, 30 or 60 and width/height to even values from 256 to 2160.

Airflow dynamic task mapping: one Sume job per prompt, capped at 4
Use submit.expand(prompt=PROMPTS) with max_active_tis_per_dag=4 and a key built from run_id and map_index. Mind max_map_length (default 1024) for big batches.

Alert when a Sume image model price changes: Python snapshot script
Compare the billed price of every Sume image model against a saved snapshot with two endpoints and a JSON file, and print only the rows that changed.

Async, webhook or sync: pick a Sume communication mode by job length
Use sync only for jobs that finish inside its 30 second cap, such as many images. Use async plus polling or webhook for video, and keep polling as the backup.

crawl_find platform and kind: which Sume social route each calls
In Sume's MCP, crawl_find takes platform plus kind; tiktok videos means keyword search and tiktok top means top search. Full mapping to the REST routes.

Instagram hashtag search vs reels search API: windows and cursors
Sume's Instagram hashtag route takes five date windows and a string cursor; the reels route takes three windows and a numeric page. Do not mix them.

One Python verifier for Sume job and run webhooks, routed on event
Job webhooks and run webhooks share one signing secret and one signature scheme, so one verify function plus a router on the event field covers both.

Postgres SKIP LOCKED job table that submits Sume jobs (Python)
A render_jobs table, a claim query with FOR UPDATE SKIP LOCKED, and an Idempotency-Key per row, so two workers never double-submit a paid Sume job.

Railway cron job that submits a Sume job and exits (Python)
Railway cron services must exit when done, skip a run while the last one is still going, and start at most every 5 minutes. Submit in webhook mode and exit.

Result 409 on Sume: job_not_completed vs run_not_completed
Both mean not ready: jobs answer 409 job_not_completed, runs 409 run_not_completed with details.status. Poll status_url, then read result_url once.

Social search returned 202 after 30 s: follow the job, don't resend
Sume's social read routes wait up to 30 seconds, then answer 202 with a job. Poll that job; resending the body runs another upstream read.

Store the Idempotency-Key before you submit: a SQLite intent table
Write key and body to SQLite, submit with that key, then store the job id. A crash between steps replays the same key and returns the original Sume job.

Which Sume submit errors to retry: a Python status triage function
Retry 429 and 503 with the same Idempotency-Key, fix 400, 413 and 415, stop on 402, poll on 409 job_not_completed. A short Python function and its table.

Sume webhook delivery statuses for jobs and runs, and a poll reconcile
Delivery status runs from pending to delivered, retrying, failed or exhausted; runs add not_armed. Failed or exhausted means poll the result, not a failed job.

Supabase Realtime for Sume render progress, with RLS per subscriber
Add the job table to the supabase_realtime publication and subscribe with a row filter. Realtime checks RLS for every subscriber, so keep the table lean.

List a TikTok creator's recent videos: handle, user_id and play_count
tiktok_videos needs a handle and returns at most 24 items; order play_count ranks only that sample, not the creator's all-time best videos.

TikTok keyword search vs top search API: date_posted or publish_time
Sume's two TikTok search routes differ in one field: date_posted on keyword search, publish_time on top search. Send the wrong one and you get a 400.

TikTok or Instagram post URL to media details: accepted URL shapes
tiktok_media and instagram_media accept only https post URLs on tiktok.com or instagram.com; profile, story and login links return 400. Accepted shapes below.

Sume webhook handler in Node: store first, answer 2xx, process later
Sume gives a webhook endpoint 10 seconds per attempt. Verify the raw body, persist the event, answer 2xx, then do slow work off the request path. Node sample.

Which Timeline warnings does the free plan call show before rendering?
Timeline plan reports gaps, tail holds, frame snaps and ignored motion, but not short sources, downgraded fades, fps resampling or soundtrack length.

Edge Add-ons screenshots: 640x480 or 1280x800, up to 6
Edge accepts up to 6 screenshots at 640 x 480 or 1280 x 800. 640 x 480 is 4:3, which Sume lists; 1280 x 800 is 16:10, so crop a 16:9 source.

Edge Add-ons small tile 440x280: crop a 3:2 Sume image
Edge's small promotional tile must be exactly 440 x 280, a 1.571 ratio. Sume lists 3:2 for FLUX.2 Pro, so crop 4.5% of the height and resize.

One image set for Chrome Web Store and Edge Add-ons: sizes
Both stores list a 440 x 280 small tile and a 1400 x 560 marquee. Edge adds 640 x 480 and 1280 x 800 screenshots, so one Sume master set can serve both.