Claude structured outputs minItems only 0 or 1 vs Sume

Anthropic's structured outputs accept minItems of 0 or 1 only. Sume's output_schema accepts minItems and maxItems, enforced on the projection. The differences.

5 min readSume
All posts

Claude's structured outputs support minItems only with a value of 0 or 1, so you cannot ask the API for at least three scenes. Sume's output_schema allows minItems and maxItems, but it enforces them on a projection read after the run, so a strict minimum can turn a good run into output null. Pick the bound by where you want the failure to land.

What does Anthropic's page say about arrays?

The structured outputs guide lists what is and is not supported. The array rule is the narrow one.

Claude structured outputs, array and number rules (read 2026-10-02)
TopicWhat the page says
Formatoutput_config.format with type json_schema
minItemsOnly 0 or 1 is supported
Other array constraintsNot supported
Numerical constraintsNot supported
additionalPropertiesOnly false
Truncationstop_reason max_tokens may leave the output incomplete

What does Sume accept?

The Sume allowlist includes minItems, maxItems, minimum, maximum and multipleOf. The same rules apply as for any strict subset: the root must be an object, every object needs additionalProperties false, and every property must be required, with optional meaning a nullable union. Keywords outside the list, such as oneOf, allOf, not and nullable, are rejected before anything runs.

A rejected schema returns 400 output_schema_invalid with a violations list and costs nothing. Every problem is reported at once, so one 400 is enough to fix it.

Why is a minimum riskier on Sume than it looks?

The schema does not steer the Format. It shapes how a finished run is read back. The Sume docs say minItems is genuinely enforced, so minItems 1 on a list the run did not produce makes the read fail. The receipt then comes back with status OK and output null, with output_error set and outcome degraded, and the media is still there.

So for lists you may receive partially, leave minItems off and check the length yourself. Use maxItems freely to cap the size.

  • Claude: you get a valid shape, and enforce counts above 1 in your own code.
  • Sume: you can express the count, and a miss becomes a degraded outcome you branch on.
  • Both: branch on the result, not on the assumption that the schema held.

Where to read next

The full allowlist is in the structured output reference. For a bulk job, a degraded item is still a finished item, so read the outcome per item before you count it as done.

Sources

Related posts

More in Models

All Models posts

Written by Sume