curl https://api.dottxt.ai/v1/chat/completions \
-H "Authorization: Bearer $DOTTXT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-20b",
"messages": [{ "role": "user", "content": "My login stopped working after the latest app update." }],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "issue_triage",
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"issue_type": { "type": "string", "enum": ["billing", "technical", "account", "shipping"] }
},
"required": ["issue_type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"issue_type": { "type": "string", "const": "other" },
"other_issue_type": { "type": "string", "minLength": 3, "maxLength": 60 }
},
"required": ["issue_type", "other_issue_type"],
"additionalProperties": false
}
]
}
}
}
}'