# Ask for JSON that matches a schema

> Chat completions accept response_format. The answer is a JSON string on message.content. Parse it. The root of the schema stays an object.

- Date: November 23, 2026
- Category: guides
- HTML: https://anyrouter.dev/blog/structured-output

## One field on the chat call

Send `response_format.type` `json_schema` on `/v1/chat/completions`. AnyRouter forwards that object. `choices[0].message.content` comes back as a JSON string. Parse it.

Keep the root an object. A non-object root is wrapped under a `result` key. `strict` is false, which is the body [Interfaze publishes](https://interfaze.ai/docs/structured-output). `strict: true` on that hop came back as ordinary prose.

A model offers this when its page lists Structured output under Details. That row links to the [guide](https://anyrouter.dev/docs/guides/structured-output). The row is there when a hop advertises `response_format` or `structured_outputs`. It is not on every model.
