Launch-day run of a Sume schedule: one key per model, input as data
Start a schedule run the day a model launches with POST /v1/actions/{id}/runs. Send the model name as input data and derive the Idempotency-Key from it.

To check a new model the day it launches without waiting for the weekly cron, enable the API trigger on the schedule and call POST /v1/actions/{action_id}/runs. Send the vendor and model as input, and build the Idempotency-Key from the model name so a repeated announcement replays the same run instead of starting a second one.
What the call needs
The call needs a key with actions:read and actions:write, a schedule whose status is active, and api_trigger_enabled set to true. A cron schedule can accept both triggers, so the weekly cadence keeps running. Keys created before the trigger shipped lack these scopes and fail with 403 insufficient_scope. You cannot add scopes to an existing key, so mint a new one.
Input is data
Sume serializes input into a fenced JSON block and gives it to the agent as data, not instructions. The saved instructions stay in charge. That suits a launch check well. The instructions say what to verify for any model, and input says which one, for example MAI-Voice-2.1-Flash from Microsoft. Do not design the schedule so that input changes what the schedule does.
Overlap on a busy day
Only one run of a schedule is active at a time, and on_active_run decides what a second request gets. The default skip returns 200 with a receipt whose status is skipped and skip_reason is previous_run_active. The value reject returns 409 action_run_in_progress. On launch day, when two vendors announce within the hour, reject makes the dropped trigger visible to your caller.
| Situation | HTTP | Branch on |
|---|---|---|
| Fresh run | 202 | status queued; poll status_url |
| Same key, same body | 200 | idempotency_hit true |
| Same key, other body | 409 | idempotency_conflict; use a new key |
| Run active, on_active_run skip | 200 | status skipped, skip_reason previous_run_active |
| Run active, on_active_run reject | 409 | action_run_in_progress; retry later |
The trigger
Branch on the receipt's status, not the HTTP code, since 200 can mean either a replay or a skip. The script below builds a stable key from the model name, asks for rejection on overlap, and prints what happened. Replace the schedule id with the opaque aut_... id and store that, not the vanity URL.
import json, os, re, urllib.request, urllib.error
def main():
vendor, model = "Microsoft AI", "MAI-Voice-2.1-Flash"
key = "launch-" + re.sub(r"[^a-z0-9]+", "-", model.lower())
body = {"input": {"vendor": vendor, "model": model},
"on_active_run": "reject"}
url = "https://api.sume.com/v1/actions/" + os.environ["ACTION_ID"] + "/runs"
req = urllib.request.Request(url, data=json.dumps(body).encode(), method="POST",
headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Content-Type": "application/json", "Idempotency-Key": key})
try:
with urllib.request.urlopen(req) as r:
d = json.load(r)["data"]
print(r.status, d["status"], d["idempotency_hit"])
except urllib.error.HTTPError as e:
print(e.code, json.load(e)["error"]["code"])
main()Why the key comes from the model
Because a key is bound to its payload, a later run for the same model with different input gets a conflict. That is the behavior you want, since it forces you to choose a new key on purpose when you really want a second look.
Sources
Related posts
More in Agents
- Make a video from a URL in Claude or Cursor: crawl_scrape, Wan 3.0
Alibaba's Wan 3.0 reads webpages; Sume's request has no web_url. In Claude or Cursor use hosted MCP: crawl_scrape the page, then generate_video with wan-3.0.
- Failed Sume job over MCP: read jobs_get, because jobs_result gives 409
For a failed Sume job, jobs_result returns 409 job_not_completed. Read error.public_reason with jobs_get, report it, and do not resubmit the same paid payload.
- generate_video MCP defaults to sume/auto; REST requires model
The generate_video MCP tool defaults model to sume/auto, but POST /v1/videos requires model. Same payload schema; the MCP server adds the default.
- jobs_cancel on Sume MCP: Write scope, idempotency_key, early moment
jobs_cancel is a write tool marked destructive. It needs the mcp:write scope or an API key, an idempotency_key, and a job that has not started generating.
Written by Sume