Season output schema: episode videos and final cut as SumeMediaFile

Bind an output_schema with SumeMediaFile fields so a Sume run returns typed episode videos. The URL gate, 10% duration check and parts-versus-cut rule.

5 min readSume
All posts

To get a typed episode back from a Sume Format run, bind an output_schema whose media fields use { "$ref": "SumeMediaFile#" } and name the field you want as primary_output_key. A completed run then returns output in that shape, with primary_output_url pointing at the file. The catch for a series is the rule about wholes and parts: a schema with scenes plus a finished cut must not fill the cut with one of its own scenes.

Everything below is from the structured-output page. The root must be an object, every object sets additionalProperties: false, every property is in required, and optional values are nullable unions.

A schema for one episode

Send it as output_schema on the run with "primary_output_key": "episode_video". Check the supported-keywords list on the structured-output page before using anyOf, and require only what the Format actually makes.

{
  "name": "acme/brand-series-episode/v1",
  "strict": true,
  "schema": {
    "type": "object",
    "additionalProperties": false,
    "required": ["episode_video", "cold_open", "synopsis"],
    "properties": {
      "episode_video": { "$ref": "SumeMediaFile#" },
      "cold_open": { "anyOf": [{ "$ref": "SumeMediaFile#" }, { "type": "null" }] },
      "synopsis": { "type": ["string", "null"] }
    }
  }
}

The gates a completed run passes

Checks before output reaches you (as of 2026-10-03)
CheckWhat it does
URL gateEvery URL must be exactly a URL this run produced; an uploaded file's URL fails the projection
Duration checkduration_ms must agree with the recorded artifact within 10%; where nothing was measured, nothing is checked
Whole versus partsWith two or more succeeded parts, the finished-cut field may not reuse one part's file
Size limits10 nesting levels, 5,000 properties, 1,000 enum values, 120,000 string characters

filled_by tells you how it was built

The receipt reports whether the run submitted your object itself (filled_by: "agent") or a constrained pass reconstructed one from the run's media and its closing text of up to 8,000 characters (filled_by: "projection"). On the projection path your input and instruction are not visible, so titles or ids that come only from the brief come back null while the media fields are full. If you score episodes automatically, read filled_by first, and check the file itself with ffprobe on primary_output_url.

When output is null

  • output: null with output_error set means nothing satisfied your schema; check output_error before reading output.
  • A completed webhook with outcome: "degraded" is that case: real artifacts in artifacts[], no structured output.
  • The built-in schema sume/action-run-output/v1 is filled deterministically with text, images, videos, audio and files; use it if you only need the media.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume