Make a partial Format result legal in your output_schema

Sume Format output_schema has no optional properties. Use nullable unions, SumeMediaFile refs and honest nulls so a run that makes 2 of 3 clips still returns.

5 min readSume
All posts

To make a partial result legal in a Sume Format output_schema, list every property in required and make the uncertain ones nullable unions such as "type": ["string", "null"]. A run that made two of three clips can then return null for the third instead of failing the whole projection.

Sume's Structured output page says there is no optional property: each declared property must be present. The page also notes that this rule causes problems for more ported schemas than any other.

Rejected and accepted shapes

A property that is declared but missing from required is rejected with required_completeness when you save the schema. The accepted fix is a nullable union, where null reads as "the run had nothing to put here".

Schema choices and what the docs say about them (read 2026-10-10)
PatternVerdictWhy
subtitle declared, not in requiredRejectedNo optional properties
subtitle: ["string","null"], in requiredAcceptedAlways present, may be null
hero_image: {"$ref":"SumeMediaFile#"}AcceptedSume's media shape; all fields required, all but type and url nullable
Assembled video field filled with one scene's fileRejected by the gateA part is not the deliverable
url of an uploaded fileFails the whole outputOnly generated media passes the URL gate
if/then, dependentRequiredNot supportedUse anyOf or validate yourself

Design for the run you can actually get

The docs describe what the gate does with a partial run: report the parts you made and leave the assembled field null, or report the real status of the assembly. So give each scene its own status field and make the final file a nullable media ref. A schema that demands an assembled video for a run that could not assemble one can only fail.

Be careful with array limits. minItems and maxItems are supported, but a minItems of three on a list of clips turns a two-clip run into a failure. That is my design advice rather than a documented rule: set minItems only when fewer items would truly make the result useless.

What the gate checks

Before output reaches you, Sume checks every URL against the media the run actually produced, using exact string equality, so placeholders like "none" do not slip through. A duration_ms in a media file must agree with the recorded length within 10% when a length was recorded. Everything else, such as labels and captions, comes from the run's own report and is not verified.

On an API run, a projection failure makes the run failed, and the receipt says why. The page also states the result: a completed run returns output that agrees with your schema and has real media URLs, or output: null with a reason, and never a schema-shaped guess.

Test it before you ship it

Save the schema and read the validation error codes, since they name the rule (required_completeness, unsupported_ref). Then run the Format once with an input you know is too thin, and check that the nullable fields come back null rather than the run failing. If you want the media without designing a schema, the built-in schema is filled deterministically from the generated media and the final text, with no model involved.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume