Blog

Agents

The Sume video agent from code: Agent Completions, scheduled runs, MCP tools and timeouts, programmatic tool calling, and guardrails for paid APIs.

Start with: What is a video agent? How Sume defines and runs one

Resume a Gemini CLI session after a Sume render: keep the job ids

Gemini CLI 0.64 preview stops deleting resumed session history. How to pick a Sume video job back up after a restart with jobs_list and jobs_wait.

Codex background tasks keep their turn's permissions: paid Sume calls

Codex 0.161.0 background tasks retain the permissions of the turn that started them. What that means for a Sume render started from a background task.

Keep untrusted text out of the prompt: Sume run input is data only

Sume writes a run's input object to a file and treats it as data, not instructions. Schedule runs allow 64 properties and 2 MiB. Use it as a guardrail.

Swap the LLM behind your MCP client: do Sume's gates change?

No. Hosted MCP gates sit in scopes, idempotency_key and max_spend_usd, not in the client model. What each session type can see, whatever model it runs.

Nightly Sume schedule: model choice and the 30-day cap math

A nightly Scheduled run caps generation at $1.00 by default, so 30 nights is at most $30. How the model's token cost sits beside that cap, with the arithmetic.

Schedule fires while the last run is active: skip or reject?

Sume schedule API runs default to on_active_run skip, which returns 200 with a skipped receipt. reject returns 409 action_run_in_progress. When to pick each.

One Sume webhook endpoint for three run types: verify, route

Format, action and agent runs share one signature scheme. Verify HMAC-SHA256 over timestamp.body, refuse an empty secret, then route on the event field.

Format run input is data, not instructions: a boundary, not a sandbox

Format runs write input to a file as data, not as instructions. That helps against prompt injection but is not a sandbox. The spend cap bounds the damage.

An agent makes 7 vertical 6-second clips on Seedance 2.5: $11 to $60

Seven 6-second 9:16 Seedance 2.5 clips cost $11.34 at 480p, $24.29 at 720p and $59.71 at 1080p on Sume. Run dry_run first and set max_spend_usd on each call.

Agent turns a product page into a clip: crawl_scrape, generate_video

On Sume MCP, crawl_scrape is a read tool that works with Write off. generate_video is paid and needs Write or a key. Split the job in two sessions to cap spend.

Backend job that needs an agent: Agent Completions or hosted MCP?

Agent Completions runs Sume's agent and returns a 202 receipt with a required spend cap. Hosted MCP is for a client whose own model calls Sume tools.

Agent leaves model blank on generate_video: 720p 8 s costs $1.00

Omit payload.model and generate_video routes to sume/auto: 3 to 10 s, 720p and 8 s by default. At 720p the price runs from $0.38 for 3 s to $1.25 for 10 s.

Same Sume agent run: Haiku 5.5 is $0.04, Mistral Large 4 is $0.50

One workload, two vendor price pages: 40 turns of 8,000 input and 400 output tokens driving Sume tools. Haiku 5.5: $0.04. Mistral Large 4: about $0.50.

Waiting 10 minutes for a Sume render over MCP: 11 jobs_wait calls

A remote MCP jobs_wait holds at most 55 seconds, so a 10-minute render takes up to 11 calls at the cap, 12 at the default 50. Re-issue the wait; never resubmit.

Mistral Large 4 as your agent: 40 Sume tool turns cost $0.50

Mistral lists Large 4 at $1.36 in and $4.18 out per million tokens. For a 40-turn agent that drives Sume, the token bill is $0.50, next to a $3.47 clip.

Pro key: 300 writes and 12,000 reads a minute for an agent on Sume MCP

On Sume Pro, each key gets 300 writes and 12,000 reads per minute. An agent polling 20 jobs every 5 s uses 240 reads, 2 percent of the read budget.

A Sume image job at 50 seconds: slow, queued, or stuck?

Sume's docs say an image still running after a 50 s jobs_wait is usually stuck, not slow. Check queued vs processing and events first; never submit twice.

Old prompt says video-router_create? Sume now takes generate_video

Sume retired the hosted MCP tool name video-router_create for generate_video and maps dots to underscores. Update the prompt, then check tools_list.

12 images from an agent on GPT Image 2.5: 12 cents at low, 72 at high

On Sume, GPT Image 2.5 bills 1 cent at low, 2 at medium, 6 to 7 at high per 1024-class image. Quality defaults to high: 12 images cost 72 to 84 cents.

dry_run or generation_admission_preview first for 12 Sume clips?

Use dry_run on a paid call for its estimate, and generation_admission_preview before a burst of 12 clips to check balance and queue room. Neither submits a job.

After generate_image on sume/auto, why can't the agent name the model?

Sume never discloses which family ran for sume/auto: job.model stays sume/auto and the model list omits it. To name a model, pin an id from image-models_list.

MCP wants a human in the loop: Sume gates for unattended agents

MCP says a human SHOULD be able to deny tool calls. For unattended agents, Sume adds scopes, idempotency keys and a required Agent Completions cap.

Auditing agent tool calls: MCP log advice, Sume script_run journal

The MCP spec tells clients to log tool usage for audit. For Sume's script_run, the response includes a calls[] journal and child jobs[] to use with jobs_wait.

Build a run status chip from the Format events phase timeline

Sume has no SSE stream for Format runs. Poll status_url and events_url to show queued, preparing, running and finalizing in your UI without faking progress.

A video agent run takes 15 to 30 minutes: design the waiting

Long-form video from an agent is minutes of work, not seconds. Email-me-when-ready, saved drafts and honest limits for a Sume Format run in your product.

Scheduled or Format API: does the clock or your user start the run?

A Sume Scheduled run fires on a cron; a Format run fires when your backend calls it. Same agent, same receipt, new trigger. How to choose without dupes.

Three ways to run the Sume video agent from code

Format runs, Scheduled runs and Agent Completions all start the same Sume agent. Pick by how often your task changes, then read the receipt the same way.

Agent Completion cost: cap, billable_amount_usd_micros, or usage?

Where to read what an Agent Completion cost: the required spend cap, the receipt's usage.billable_amount_usd_micros, and GET /v1/usage as the billing record.

Claude Code routine artifacts: link Sume media, don't paste it

Claude Code 2.1.292 lets Scheduled and Run now routines publish a private artifact without approval. Hand off Sume results as durable media.sume.com links.

Claude Code scheduled task never fired? Compare with a Sume cron run

Claude Code 2.1.292 fixed scheduled tasks that never fired after /resume, /branch or /clear. A Sume schedule runs on Sume's clock, so check it separately.

Codex keeps your computer on reconnect: find Sume jobs first

Codex CLI 0.161.0 keeps a new task on the selected computer while it reconnects or is offline. After a gap, list Sume jobs before you resubmit any paid call.

Mistral Large 4 preview: Sume's agent model field takes one value

Mistral Large 4 is reported in preview. Sume lists no Mistral Large id; Agent Completions accepts only sume-agent. What to send instead, and what it bills.

One webhook handler for Sume agent, Format and schedule runs

A single receiver can handle all three Sume run types: verify the HMAC over timestamp.body, dedupe on request_id, and branch on outcome (ok, degraded, error).

Run a weekly short video series on autopilot with a Sume schedule

A weekly short-video series needs a schedule with a cron expression, an IANA timezone and a spend cap, plus an optional API trigger. How to set it up on Sume.

Stop an AI video agent overspending: the four Sume spend gates

An unattended Sume agent can only spend what four gates allow: the wallet, a per-run cap, a schedule ceiling, and a Format cap. Values and failure codes inside.

Polling a Sume agent run: next_action values and backoff

Poll Sume runs by branching on next_action (poll_status, retry_later, none), using status_url and result_url, backing off on 429 and 503.

Nightly UGC ad job: Agent Completion, Format run or schedule?

Pick the Sume surface for a nightly UGC ad job: Format run when inputs change, schedule when only the clock starts it, Agent Completion for one-off tasks.

Get a structured ad pack back from one Sume Agent Completion

Bind an output_schema to a Sume Agent Completion to get hook, caption, CTA and a video URL as named fields, with the strict-subset rules and failure modes.

Codex 0.160.0 resumes queued messages after reconnect: Sume key rule

Codex 0.160.0 resumes unsent queued messages after a reconnect without duplicates. A paid Sume call still needs its own idempotency_key to be safe.

Claude Code 2.1.287 tool heartbeats and Sume jobs_wait slices

Claude Code 2.1.287 fixed tool heartbeats not reaching SDK hosts during a stalled response stream. Sume's jobs_wait holds up to 55 s, so heartbeats matter.

script_run or bulk runs: where to fan out 20 ad variants

script_run fans out three or more Sume tool calls inside one 55-second request; bulk runs queue up to 100 Format runs for hours. Limits and a rule of thumb.

Cursor iOS remote control for local agents: keep paid Sume calls safe

Cursor can now show and answer local agents from its iOS app. If one holds Sume MCP, grant read-only, send dry_run first, and cap max_spend_usd.

Agent Completion plans the season; a Format bulk queue renders it

One Agent Completion drafts episode beats as JSON; each beat becomes an item in a Format bulk run. Spend caps at both steps.

Let a video agent read before it spends: MCP OAuth read, then write

Hosted MCP OAuth gives mcp:read by default and mcp:write by a consent toggle. Let an agent plan with reads, then enable write for paid calls.

Weekly episode on a schedule: the $1.00 default cap stops video

A Scheduled run with no spend cap defaults to $1.00, and a caller can only lower it. Set the cap when you create the schedule.

Agent Completion 400: generation_spend_cap_usd has no default

Your POST to /v1/agent/completions returns 400? generation_spend_cap_usd is required and has no default. Add it, and pick a number from a real run.

Lower the spend cap for one scheduled Sume run: overrides only go down

A per-run generation_spend_cap_usd on a scheduled run is clamped to the schedule's own cap. You can lower it for one run but never raise it. How it works.

Captions drift after cutting pauses: burn them on the final render

Cut pauses first, then caption. Word times from the original clip no longer match once silence is gone. Run Sume video-captions on the trimmed render.