# Return JSON that matches a schema

> Return JSON that matches a schema: 6 companies fully do it, 24 with a limit, 42 carry the tag. Every listing in Model APIs & inference with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/inference.structured-extraction/
- Markdown: https://www.anchorterminal.com/niches/inference.structured-extraction/index.md (~2,850 tokens)
- Slim: https://www.anchorterminal.com/niches/inference.structured-extraction/index.min.md (~630 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/inference.structured-extraction/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

Four or more companies' docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 6 | 24 | 42 | 10 | 4 |

## What counts as done

Output parses as JSON and validates against the schema, and refusals and truncation are signalled in a field the caller can check.

Measured, for our own tests: output parses and validates on every call in a 100-call run, and a schema that validated last week still validates this week.

How agents ask for it: extract these fields as JSON; classify each row into one of these labels; give me output my code can parse without cleaning

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **Azure OpenAI in Foundry Models (Microsoft Corporation)**: response_format json_schema with strict true and strict function tools, refusal and finish_reason fields on every response; schema limits are the OpenAI subset.
- **Cerebras Inference (Cerebras Systems Inc.)**: response_format json_schema with strict true uses constrained decoding on the listed models, every object needing additionalProperties false; strict false is a hint only.
- **Cohere Chat API (Command models) (Cohere Inc.)**: response_format json_object or json_schema forces the schema and strict_tools does the same for tool arguments; not available in RAG mode and json_object needs an explicit JSON instruction or the model can loop.
- **DeepInfra (Deep Infra Inc.)**: response_format json_schema with strict constrains output to the schema on the models tagged for it; no refusal field is described.
- **Fireworks AI Inference (Fireworks.ai, Inc.)**: response_format json_schema or a grammar constrains output, finish_reason length flags truncation, and the supported and unsupported schema keywords are listed; pattern is best effort.
- **Meta Model API (Meta Platforms, Inc.)**: response_format json_schema constrains decoding so output always matches, recursive schemas return 400, and a 120,000-character schema limit is stated; strict false behaves as true for response_format.

## Does the job, with a limit

It does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.

- **Amazon Bedrock (Amazon Web Services, Inc.)**: Strict tool use and output_config.format validate against a JSON Schema 2020-12 subset server-side, but a new schema compiles for up to 90 seconds, every object needs additionalProperties false, and schemas are capped at 12 optional and 16 union-typed properties.
- **Claude API (Anthropic, PBC)**: output_config.format json_schema and strict tools use a server grammar, with stop_reason refusal and max_tokens as signals. The docs admit an enum value differing only in case can pass with no error, so caller validation is still needed.
- **BlockRun.AI (BlockRun, Inc.)**: response_format accepts json_object and json_schema and is forwarded to the upstream lab; the OpenAPI document has no strict field and no refusal path, so enforcement is whatever the upstream does.
- **Cloudflare AI Gateway (Cloudflare, Inc.)**: No schema enforcement of its own; response_format passes through to the provider, so validity is the upstream's.
- **Cloudflare Workers AI (Cloudflare, Inc.)**: JSON mode takes response_format json_schema on four listed models, one of which (llama-3.1-8b-instruct) is on the retirement list; no strict flag or refusal path is documented.
- **DeepSeek API (Hangzhou DeepSeek Artificial Intelligence Co., Ltd.)**: response_format has json_object only, the caller must also ask for JSON in the prompt, and non-JSON output is replaced with spaces so the content comes back blank; schema enforcement exists only for tool arguments in beta strict mode.
- **Eden AI (Eden AI SAS)**: response_format is forwarded and a json_heal hook can repair output against a json_schema after the call, but no strict flag or refusal field is documented.
- **Glimpse (Elorian AI, Inc.)**: response_format and structured_outputs are in the endpoint's supported parameters and OpenRouter forwards strict json_schema, but enforcement is Together's and no refusal path is documented.
- **Gemini Developer API (Google LLC)**: response_format json_schema constrains decoding, but several keywords (minimum, maxContains and others) are ignored and left to the client, and acc-06 saw one model wrap JSON in Markdown fences while Flash behaved.
- **GroqCloud (Groq LLC)**: strict true uses constrained decoding and guarantees the schema, but only on select models; best-effort mode can return malformed JSON or 400 with failed_generation.
- **Hugging Face Inference Providers (Hugging Face, Inc.)**: response_format json_schema is forwarded and the guide promises schema compliance, but supports_structured_output is true on only 102 of 247 provider endpoints and no refusal path is documented.
- **LiteLLM (Berrie AI Incorporated)**: response_format json_schema is forwarded and get_supported_openai_params says whether a model takes it; enforcement is the provider's.
- **Mistral AI API (Mistral AI (RCS Paris 952 418 325))**: response_format json_schema with strict true on all models except codestral-mamba; no refusal field is documented and the known-limitations page says JSON mode alone doesn't follow a schema.
- **Muse Spark Open (Meta Platforms, Inc.)**: Meta's examples use response_format json_object on a hosted provider; schema enforcement depends on the serving stack and no strict flag or refusal path is documented.
- **Nemotron 3.5 Super VL (NVIDIA Corporation)**: response_format accepts json_object and json_schema; no strict flag, refusal field or validation statement in the reference.
- **Novita AI (Novita AI)**: json_schema response_format 'ensures the model will match your supplied JSON schema' on listed models; no strict flag or refusal field, and the listing's open question notes a FAQ that calls json_schema unsupported.
- **OpenAI API (OpenAI OpCo, LLC)**: strict json_schema with a refusal content type and an incomplete status reason of max_output_tokens; acc-05 reports a schema that validated for weeks failing on 18 June 2026 with no changelog.
- **OpenRouter (OpenRouter, Inc.)**: json_schema with strict true, but enforcement varies by provider; without require_parameters a request may land on a host that ignores it or fail for lack of support.
- **Prism Inference (Prism Technologies Inc)**: JSON mode and strict JSON Schema on Chat Completions, with strict in the OpenAPI; no refusal field or validation statement, and no first-hand account.
- **Router.com (Ramp Router) (Ramp Business Corporation)**: response_format json_object is translated natively; a strict json_schema path isn't shown in the pages read, and model refusals end the request without fallback.
- **Beam 1.0 (Reflection AI)**: json_schema response_format with a strict mode, a refusal field and finish_reason length documented; there is no changelog, so schema stability over time can't be checked.
- **RouterPlus (EVO HQ Inc)**: response_format works for GPT ids and open models, not Claude; on /v1/messages output_config.format maps to a strict json_schema for open models; no refusal path documented.
- **SambaCloud (SambaNova Systems, Inc.)**: json_schema response_format on supported models, but strict is accepted for true and false and only enforced 'when strict enforcement is available', so validation stays with the caller.
- **SiliconFlow (SiliconFlow Labs Pte. Ltd.)**: JSON Mode (json_object) only, on most models except DeepSeek R1 and V3; the guide says the app must handle incomplete JSON, and there is no json_schema or strict.
- **Together AI Inference (Together Computer, Inc.)**: json_schema response_format on supported models, but the guide pairs it with prompt instructions and documents no strict flag or refusal field.
- **xAI API (Grok) (SpaceXSI (xAI))**: json_schema response_format with strict true; structured outputs with tools only on supported Grok 4 models, and no refusal field in the pages read.

## Couldn't check

The docs were closed to us, or silent. These carry no mark either way.

- **Antseed (Antseed Foundation)**: No response_format or schema enforcement appears in the API or routing pages read.
- **Jais 3 (Mohamed bin Zayed University of Artificial Intelligence (Institute of Foundation Models), with Inception42 (a G42 company))**: Schema enforcement would come from vLLM or SGLang guided decoding; the cards are silent.
- **StepFun API (STEPFUN TECHNOLOGY (HK) LIMITED)**: The host platform.stepfun.ai closed the connection on every attempt (curl exit 56, no HTTP status) from this session, so no page was read.
- **Tencent Cloud TokenHub (Tencent Cloud Computing (Beijing) Co., Ltd. (腾讯云计算（北京）有限责任公司))**: The host cloud.tencent.com closed the connection on every attempt (curl exit 56, no HTTP status) from this session, so no page was read.
- **Vercel AI Gateway (Vercel Inc.)**: The structured output pages weren't opened; response_format passes through the OpenAI-compatible endpoint but strictness is the provider's.
- **Vertex AI (Gemini Enterprise Agent Platform) (Google LLC)**: The structured output page returned 404 at the paths tried, so response_schema wasn't verified here.

- not this job: MiniMax API (Nanonoble Pte. Ltd.): Neither OpenAPI file has response_format or a JSON schema mode, and the OpenAI-format schema also lacks tool_choice, so schema enforcement is the caller's job.
- not this job: Simplismart (Verute Technologies Private Limited): No response_format or JSON mode in the OpenAPI file.
- not this job: SWE-2 Flash (Cognition AI, Inc.): No API and no schema mode.

6 listings in the category were added after this reading and aren't marked yet.

## What stops agents finishing

- server-side schema validator changes with no changelog, rejecting schemas that passed
- model wraps JSON in Markdown fences on one model while siblings behave
- strict flag accepted but ignored, so validation is the caller's job
- stop sequences ignored, breaking the parser

## Around it

Before: web-scrapers.page-to-markdown, document-extraction.pdf-to-text. After: vector-db.store, document-extraction.table-from-text.

## Where this comes from

Weight 10 of 100 in Model APIs & inference: 4 of 28 accounts; two are forum threads with a dozen users each reporting valid schemas that stopped validating

As data: https://www.anchorterminal.com/api/v1/use-cases/inference.structured-extraction.json, or the MCP tool get_use_case with id inference.structured-extraction. Draft, read 2026-11-12 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
