Feature compatibility
Works with:
- Batch processing: Process structured outputs at scale with 50% discount
- Token counting: Count tokens without compilation
- Streaming: Stream structured outputs like normal responses
- Combined usage: Use JSON outputs (
output_config.format) and strict tool use (strict: true) together in the same request
Incompatible with:
Citations: Citations require interleaving citation blocks with text, which conflicts with strict JSON schema constraints. Returns 400 error if citations enabled with
output_config.format.Message Prefilling: Incompatible with JSON outputs
Grammar scope: Grammars apply only to Claude's direct output, not to tool use calls, tool results, or thinking tags (when using thinking). Grammar state resets between sections, allowing Claude to think freely while still producing structured output in the final response.