Asking a model for JSON works three ways, a JSON schema, JSON mode, or a plain instruction in the prompt, and only the first two can be enforced; this page lists which ids on this catalog are verified to accept response_format, explains what the catalog's flags do and do not mean, and shows why an answer that does not match the schema is retried once here and the miss is never billed. Every request below goes to https://api.uplinkswitch.com/v1/chat/completions with the OpenAI SDK or curl; the same response_format field is accepted on every model route.
The three ways, and what each one guarantees
| Method | How you ask | What is guaranteed | When it fails |
|---|---|---|---|
| JSON schema | response_format: {"type": "json_schema", "json_schema": {...}} | Output is valid JSON and matches the schema's shape | A missing required key, a wrong type, prose around the object |
| JSON mode | response_format: {"type": "json_object"} | Output is valid JSON | A code fence, a trailing sentence, truncated output |
| Instruction | "Reply only with JSON" in the prompt | Nothing; the model usually complies | Any of the above, with no signal that it happened |
On this gateway, the first two carry a billing rule the third does not: with json_object or json_schema in the request, only a matching answer is charged. When a non-streamed answer misses, the gateway asks the model a second time at no cost to you, and a second miss goes unbilled as well. The guarantee shares the account's daily refund allowance with refusal refunds, and a streamed answer is billed as sent because the gateway cannot check what it has already forwarded. Put the schema in the request, not the prompt, and the parse failure never reaches your balance.
Which models accept response_format
The catalog at GET /v1/catalog carries a supported_parameters list per model: the parameters that have been verified against that id. Two entries matter here. response_format is the field itself. structured_outputs is listed separately for ids where schema-following has been checked as well; the catalog does not define the two further, so treat a row with both as verified for a schema and a row with response_format alone as verified for the field, with json_schema something to test before you rely on it.
The ids below are the catalog rows whose supported_parameters includes response_format or structured_outputs and whose availability is ok on the reading date. The catalog's tuned variants of the same models, whose ids carry a suffix, share the flags and are left out of the table; the live catalog is the authority at build time.
| Model id | Developer | response_format | structured_outputs | Tools | Routes |
|---|---|---|---|---|---|
deepseek-r1 | DeepSeek | yes | - | yes | chat completions, messages, responses, Gemini |
gemma-3n-e2b-it | yes | - | yes | chat completions, messages, responses, Gemini | |
gemma-4-12b-it | yes | yes | yes | chat completions, messages, responses, Gemini | |
gemma-4-26b-a4b-it | yes | - | yes | chat completions, messages, responses, Gemini | |
gemma-4-31b-it | yes | - | yes | chat completions, messages, responses, Gemini | |
llama-3.3-70b-instruct | Meta | yes | - | yes | chat completions, messages, responses, Gemini |
muse-glimmer-30b | Meta | yes | - | yes | chat completions, messages, responses, Gemini |
muse-spark-open | Meta | yes | - | yes | chat completions, messages, responses, Gemini |
minimax-m2.5 | MiniMax | yes | yes | yes | chat completions, messages, responses, Gemini |
minimax-m2.7 | MiniMax | yes | yes | yes | chat completions, messages, responses, Gemini |
devstral-2512 | Mistral | yes | - | yes | chat completions, messages, responses, Gemini |
kimi-k2-0905 | Moonshot AI | yes | - | yes | chat completions, messages, responses, Gemini |
kimi-k2-instruct | Moonshot AI | yes | yes | yes | chat completions, messages, responses, Gemini |
kimi-k2-thinking | Moonshot AI | yes | - | yes | chat completions, messages, responses, Gemini |
kimi-latest | Moonshot AI | yes | yes | yes | chat completions, messages, responses, Gemini |
nemotron-3.5-super-vl | NVIDIA | yes | yes | yes | chat completions, messages, responses, Gemini |
gpt-5.3-codex | OpenAI | yes | - | yes | chat completions, messages, responses, Gemini |
qwen3.5-122b-a10b | Qwen | yes | - | yes | chat completions, messages, responses, Gemini |
qwen3.5-35b-a3b | Qwen | yes | - | yes | chat completions, messages, responses, Gemini |
step-5-preview | StepFun | yes | yes | yes | chat completions, messages, responses, Gemini |
hy4 | Tencent | yes | yes | yes | chat completions, messages, responses, Gemini |
hy4-preview | Tencent | yes | yes | yes | chat completions, messages, responses, Gemini |
Source: catalog.json supported_parameters, endpoints and availability per id. Prices for each row are on the price index, ours beside the developer's list.
An empty list means unverified, not refused
Most rows in the catalog have an empty supported_parameters list, and that includes heavily used ids: claude-sonnet-5-5, gemini-4-argon and gpt-6.1-sol among them. Empty means nobody has recorded a verification for that id yet; it does not mean the parameter is rejected. The gateway passes response_format through to every model route, and the billing guarantee applies to any request that asks for JSON, listed or not. So the practical reading is: a listed id is a safe default for a JSON pipeline, and an unlisted id is one test request away from being your own verified row.
A request with a schema
The OpenAI SDK sends the field unchanged. Keep stream off when you want the free retry.
from openai import OpenAI
client = OpenAI(base_url="https://api.uplinkswitch.com/v1", api_key=KEY)
schema = {
"name": "ticket",
"strict": True,
"schema": {
"type": "object",
"properties": {
"category": {"type": "string", "enum": ["billing", "bug", "other"]},
"urgent": {"type": "boolean"},
"summary": {"type": "string"},
},
"required": ["category", "urgent", "summary"],
"additionalProperties": False,
},
}
r = client.chat.completions.create(
model="kimi-latest",
messages=[{"role": "user", "content": "Customer says: charged twice, please fix today."}],
response_format={"type": "json_schema", "json_schema": schema},
)
body = r.to_dict()
print(body["choices"][0]["message"]["content"]) # the JSON object
print(body["model"], body["usage"]["cost"]) # who answered, what it costThe same with curl, in JSON mode rather than a schema:
curl https://api.uplinkswitch.com/v1/chat/completions \
-H "Authorization: Bearer $UPLINKSWITCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-4-12b-it",
"messages": [{"role": "user", "content": "Return the three primary colours as a JSON array under the key colours."}],
"response_format": {"type": "json_object"}
}'Two habits make either shape reliable across developers. Name the keys you want in the prompt as well as in the schema. And keep max_tokens generous: an answer cut off by the request's own output limit is not valid JSON and is not treated as a model miss, so it is not refunded.
What a miss looks like on your side
You will usually not see one. The gateway checks the non-streamed answer against the JSON or schema the request asked for, and on a miss it asks the model again and returns the retry. Afterwards the evidence is in the record: GET /v1/requests/{request_id} shows the request's refund field, and the signed receipt at GET /v1/requests/{request_id}/receipt carries refund: "invalid_output" when an answer was not billed, verifiable at /statements/verify. If both attempts miss, the body you receive is the second answer and the charge is nothing; parse defensively and treat that as a signal to change model or schema.
With model: "auto", a request carrying a json_schema answer is classified to the balanced tier rather than the fast one, because schema-following is one of the signals the auto router uses; the body's model field names the id it chose.
Tool calls as a fourth way
If what you want is a function's arguments rather than a document, send tools instead. Tool definitions travel in OpenAI's tools shape and the calls return as tool events, arguments included, streamed piece by piece; every id in the table carries the flag (the Tools column). A tool call's arguments are JSON by construction; the catalog's tools flag is the one to check for that path, and the SDK guide shows the loop.