Gift message field in a strict output schema: optional means nullable
In a Sume output_schema every property must be required, so an optional gift message is a string-or-null union, not an omitted key. Here is the shape.

You cannot leave a property out of required in a Sume strict schema. A gift message that exists for some SKUs and not others is declared as { "type": ["string", "null"] }, and the agent returns null when there is none.
The rules that cause the 400
- The root must be an object.
- Every object needs
additionalProperties: false. - Every property must appear in
required. - Only an allowlist of keywords is accepted:
anyOf,enum,const,pattern,minLengthand similar.oneOf,allOfandnullableare rejected. - The schema
nameis 1 to 64 characters fromA-Za-z0-9._/-.
The wrong and the right shape
A schema that lists gift_message in properties but not in required fails validation at submit time. The fix is one line.
{
"type": "object",
"additionalProperties": false,
"required": ["headline", "gift_message"],
"properties": {
"headline": { "type": "string" },
"gift_message": { "type": ["string", "null"] }
}
}Why null instead of an empty string
null tells your code the agent had nothing to say; an empty string looks like a real value. Branch on it in your catalog import and you avoid printing a blank gift card. Limits to keep in mind: depth 10, 5,000 properties, 1,000 enum values and 120,000 string characters across the schema.
Sources
Related posts
More in Formats
- Holiday gift set video from 30 photos: the Sume attachments limit
A gift set has many parts. Sume accepts up to 30 images in attachments and a 30-file media budget per run, so plan which shots go in before you call.
- Image API n or a bulk Format run: which to use for ad variants
Use Image API n for same-prompt variants at one ratio, and a bulk Format run when each variant needs its own instruction, input, spend cap or webhook.
- Invite a workspace to run your Format: POST grants stays pending
POST /v1/formats/{handle}/{slug}/grants invites a team workspace with role run or write. The grant is pending and confers nothing until their admin accepts.
- Is running the same Format weekly a template to YouTube?
A Sume Format is a saved recipe, not a saved video. How to separate the repeatable process from the repeatable output so weekly Shorts do not read as templated.
Written by Sume