Weekly content calendar as JSON: a Sume Format output schema
Bind a JSON Schema to a Sume Format run and get a seven-day content calendar back as validated JSON, with real dates, enums and media references.

How do I get a weekly calendar back as JSON, not prose?
Pass output_schema on the run. Sume validates the result after the run with Ajv, and output comes back only if it satisfies the schema. A violation gives output_schema_unsatisfied and output_error, with output set to null, so your spreadsheet import never sees a half-valid calendar. That check is the reason to prefer a schema over asking nicely in the instruction: a calendar with six days, a misspelled weekday or a date such as 2026-13-01 fails loudly instead of landing in a Google Sheet unnoticed.
The strict subset has rules worth knowing up front: the root must be an object, every object needs additionalProperties: false, and every property must appear in required. Optional means a nullable union such as ["string", "null"]. oneOf, allOf and nullable are rejected.
What does a seven-day schema look like?
The keywords minItems, maxItems, enum, format and pattern are all enforced after the run, so the schema can insist on exactly seven days, a fixed set of weekday names and a real date. A video the agent generated can be returned with the media reference SumeMediaFile#.
{
"type": "object",
"additionalProperties": false,
"required": ["week_of", "days"],
"properties": {
"week_of": {"type": "string", "format": "date"},
"days": {
"type": "array", "minItems": 7, "maxItems": 7,
"items": {
"type": "object", "additionalProperties": false,
"required": ["weekday", "date", "caption", "video"],
"properties": {
"weekday": {"enum": ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},
"date": {"type": "string", "format": "date"},
"caption": {"type": "string", "maxLength": 150},
"video": {"$ref": "SumeMediaFile#"}
}
}
}
}
}
What limits apply, and what fills the fields?
Each field is filled either by the agent or by a projection step. The projection never sees input, so any value that depends on your request, such as the Monday date, belongs in the instruction or must be something the agent produced. Schemas are limited to depth 10, 5,000 properties and 120,000 total string characters.
Send output_schema or the OpenAI-style response_format, never both: that is a 400.
- Put the start date in the
instructionso the agent can emit real dates. - Keep captions under a character limit with
maxLength, and check it at the receiver anyway. - Treat a null
outputas a failed run, not as an empty week. - Add
$reftoSumeMediaFile#only where a generated file belongs.
Sources
Related posts
- Sume Format structured output: typed JSON from a JSON Schema
- Format output filled_by: agent versus projection, exact URLs
- Format output_schema keywords: pattern and minLength yes, not no
- Hashtag and caption limits in a Sume output schema, checked post-run
- Flat Sume output schema for a spreadsheet row: null is an empty cell
More in Formats
- Weekly Sume run idempotency key from the ISO week: 2026 has 53
Key a weekly Sume run by ISO week so a retried cron never double-bills. Python's %G-W%V gives 2026-W53 for Jan 1, 2027, and plain year-week keys break there.
- Image types a Sume Format run accepts: JPEG, PNG, WebP, GIF, AVIF
A Format run accepts five image types, 30 files and 500 MB in total. Convert HEIC and TIFF first, and prefer public HTTPS URLs over asset ids.
- Worst-case spend of a 100-item Sume bulk queue and its spend caps
Each bulk item can carry its own spend cap up to $500, and caps are not clamped to the Format cap. Do the worst-case math before you submit.
- YouTube template videos need distinct storylines: vary each brief
YouTube monetization policy flags mass-produced, repetitive template content. Vary the brief for every item in a Sume Format bulk run and test similarity.
Written by Sume