Micro-drama episode manifest as a Format output schema (strict rules)
Bind an output_schema to a Format run and get typed JSON: episode number, title and a SumeMediaFile video. Strict subset: object root, every property required.

How do you get a Format run to return an episode record instead of loose text? Bind an output_schema on the run: the response comes back as your own JSON, with a media field typed as SumeMediaFile for the video. The schema must follow the strict subset, which means an object root and every property listed in required.
Series publishing needs records. Shorts series number episodes by publish date, and your own scheduler needs the episode number, a title and a URL for each video in one object it can write straight into a database.
A schema that passes
Optional fields are expressed as a nullable union, because no property may be left out of required.
{
"output_schema": {
"name": "acme/episode/v1",
"strict": true,
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["episode_number", "title", "cliffhanger", "video"],
"properties": {
"episode_number": { "type": "integer" },
"title": { "type": "string" },
"cliffhanger": { "type": ["string", "null"] },
"video": { "$ref": "SumeMediaFile#" }
}
}
},
"primary_output_key": "video"
}The rules, in one table
Schemas are checked against an allowlist at submit. A violation returns 400 output_schema_invalid with details.violations[]; nothing runs and nothing is charged.
| Rule | Detail |
|---|---|
| Root | Single type object |
| Objects | additionalProperties: false on every object |
| Properties | Every declared property in required |
| Optional | Nullable union such as ["string", "null"] |
| Rejected | oneOf, allOf, not, if/then/else, patternProperties |
| Allowed | anyOf, enum, const, $defs, $ref (limited) |
Where the video URL comes from
SumeMediaFile has type, url, content_type, file_name, size_bytes, width, height, duration_ms and expires_at, with every field required and all but type and url nullable. The url must be one this run actually produced; the URL gate rejects a link the run did not make. expires_at is null for durable media.sume.com URLs.
primary_output_key names the field to resolve into primary_output_url on the receipt. It is null while the run is not terminal and when output_error is set.
Failure modes
The projection happens after the run. If it cannot match your schema, a completed run has outcome degraded: output is null, output_error gives the cause, and artifacts[] still holds the real media. Check output_error before you read output, and keep a fallback path that reads artifacts when the typed record is missing.
Sources
Related posts
More in Formats
- One bad item in a 100-item Format bulk request: 400, nothing runs
A Format bulk create validates every item first. One invalid item returns 400 with details.index and queues nothing.
- Smallest vertical video size that passes Google Ads and TikTok
Google lists 720x1280 as the vertical minimum, TikTok in-feed 540x960 and its app bundle 720x1280. One Timeline output size clears them all, with the table.
- Sume product commercial vs cinematic studio vs beauty studio
Three Sume catalog Formats make premium 9:16 product films: product-commercial, cinematic-studio-commercial and beauty-studio. How to call each.
- Previously on: add a recap to a YouTube Shorts series episode
Open a Shorts episode with a Previously on recap: build it with Timeline 1.0 audio.parts and see what it costs per minute.
Written by Sume