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. 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. The row is there when a hop advertises response_format or structured_outputs. It is not on every model.
Related posts
- Use AnyRouter with the Vercel AI SDKGuidesJuly 19, 2026 · @anyr/ai-sdk-provider wraps the AnyRouter gateway as a standard Vercel AI SDK provider. Call createAnyRouter(), pass a provider/model id, and generateText, streamText, and generateObject work unchanged, switching models is a one-string edit.
- What is AnyRouter? A plain-English guide to AI model routingGuidesAugust 5, 2026 · An AI model router lets you call many LLMs through one API. Here's what AnyRouter is, why it exists, and whether it's useful for your next project.
Pick a plan and start
Create an account, pay on the next screen, then call the model.