Format output_schema for partial results: nullable and primary key

How to design a Sume Format output_schema so a run that makes the video but misses a caption still passes: nullable fields, no minItems, and primary_output_key.

5 min readSume
All posts

A strict output schema fails the run when the object cannot be filled, so design for partial success. Make every optional field a nullable union, avoid minItems on arrays that the run might legitimately leave empty, and set primary_output_key to the one field you cannot ship without. Sume then validates the object against the schema and checks that the primary output exists.

Sume requires every property to be listed in required and additionalProperties: false on every object, so "optional" is expressed as ["string","null"] or an anyOf with null, never as an omitted key.

A schema that tolerates a missing caption

{
  "type": "object",
  "additionalProperties": false,
  "required": ["video_url", "caption", "duration_ms"],
  "properties": {
    "video_url": { "type": "string" },
    "caption": { "type": ["string", "null"] },
    "duration_ms": { "type": "integer" }
  }
}

What fails the run

output_error codes per Sume docs (read 2026-10-03)
CodeMeaning
output_schema_unsatisfiedObject does not match the schema
output_extraction_failedNo object could be extracted
unattended_blockedRun needed a human
deliverable_missingNo deliverable produced
primary_output_missingprimary_output_key field is empty
agent_reported_failureThe run reported it could not finish

Send primary_output_key with the schema

Set "primary_output_key": "video_url" next to output_schema in the run body. It is capped at 64 characters. output_schema and response_format are alternatives: sending both is a 400.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume