Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
Structured Outputs
This page only documents Structured Output flows that were verified with real requests against Crazyrouter production.
Verification date:
Strictly verified models:
Not included as a strict-success example:
Reason:
- Under the current OpenAI-compatible
response_format=json_schema request shape, claude-sonnet-4-6 did not show stable strict-JSON behavior across production checks
- Earlier testing produced JSON wrapped in Markdown code fences
- The
2026-03-22 recheck returned empty content
- Because the result is not stable or strictly parseable, it is not treated as a verified strict structured-output success example
Verified matrix
| Model | Protocol | Endpoint | Success marker |
|---|
gpt-5.4 | OpenAI Chat Completions | POST /v1/chat/completions | Response can be parsed directly as JSON |
gemini-3-pro | Gemini Native | POST /v1beta/models/{model}:generateContent | Returns JSON text matching schema |
GPT-5.4
curl https://crazyrouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Return a JSON object with keys city and country for Tokyo."
}
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "city_country",
"strict": true,
"schema": {
"type": "object",
"properties": {
"city": { "type": "string" },
"country": { "type": "string" }
},
"required": ["city", "country"],
"additionalProperties": false
}
}
}
}'
Verified production output:
{"city":"Tokyo","country":"Japan"}
Gemini 3 Pro
curl "https://crazyrouter.com/v1beta/models/gemini-3-pro:generateContent?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Return a JSON object with keys city and country for Tokyo."
}
]
}
],
"generationConfig": {
"responseMimeType": "application/json",
"responseSchema": {
"type": "object",
"properties": {
"city": { "type": "string" },
"country": { "type": "string" }
},
"required": ["city", "country"]
}
}
}'
Verified production output:
{"city":"Tokyo","country":"Japan"}
See Also