primary_output_key on a headline string: primary_output_url is null
If primary_output_key names a text field in your Sume output_schema, the receipt echoes the key but primary_output_url is null. Point it at the media field.

If primary_output_key names a text field such as headline, the receipt echoes that key back and primary_output_url is null, because a string has no URL to resolve. Point the key at the media field instead, for example hero_image.
The resolution order
primary_output_key is up to 64 characters. The receipt resolves primary_output_url in order: the key on your request, then the Format's own key, then the first top-level key that holds a media object or an array that starts with one. For the built-in schema, the fallback order is videos, images, audio, files.
The step stops at a key you named when output has a value under it, even a value that is not media. It moves to the fallback only when the key is missing or empty.
| Request key | Value at that key | primary_output_url |
|---|---|---|
| hero_image | A SumeMediaFile object | Its url |
| headline | A string | null; key echoed |
| missing_key | Not in output | Falls back to the first media field |
| Any key | output_error is set | null |
A schema that sets it correctly
Bind the key next to your schema so the receipt shows the one URL your UI needs.
{
"output_schema": {
"name": "acme/promo-hero/v1",
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["headline", "hero_image"],
"properties": {
"headline": { "type": "string" },
"hero_image": { "$ref": "SumeMediaFile#" }
}
}
},
"primary_output_key": "hero_image"
}Why the headline case is quiet
Nothing errors, which is why this one is easy to miss. The run is completed, output is full, and the key you named is echoed back. Only the URL is empty, so a UI that renders primary_output_url shows a blank slot.
Test your key against a real receipt in a pilot, and treat a null primary_output_url on a completed run as a prompt to read primary_output_key and output_error before you suspect the generation.
The same care applies when you set the key yourself. Pick a key that names a generated media file, and read the other fields from the structured output instead of expecting a URL for text.
If you later change the Format's schema, recheck the key as well, since a renamed field would leave the old key pointing at nothing and the URL would be null again.
Tradeoff
The key is a convenience for one primary item. If your Format makes several deliverables, read output and artifacts[] directly instead of forcing one URL to stand for all of them. Both fields are null while the run is not terminal.
Sources
Related posts
More in Formats
- Refresh last year's holiday Format: one commit, rerun with v2 keys
Update a Sume Format for this holiday season with one Contents API commit, then re-queue with v2 Idempotency-Keys. Runs read the package they started with.
- Retry only the failed episodes from a Sume bulk queue
A Sume bulk queue shows completed even when items failed. Find the failed children and re-queue only those, with fresh keys and untouched keys for the rest.
- Season 2 of a Shorts series: same Sume Format, new input, new keys
Start season 2 without rebuilding anything. Keep the Format, change the input and idempotency keys, and keep season 1 receipts as a style reference.
- Seasonal Format: a new slug per season, or edit the same one in place?
Edit one Sume Format in place and keep one address, or create a slug per season and keep each look reproducible. Contents API has no revert, which tips it.
Written by Sume