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": "Classify this support ticket. Return each evidence item as a plain English sentence quoting specific details from the ticket text. Ticket: App crashes immediately after the latest update, reproducible on Android 15 devices only." }],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "decision_payload",
"schema": {
"type": "object",
"properties": {
"label": { "type": "string", "enum": ["billing", "technical", "account", "other"] },
"evidence": {
"type": "array",
"items": { "type": "string", "minLength": 10, "maxLength": 140 },
"minItems": 1,
"maxItems": 3
},
"decision_summary": { "type": "string", "minLength": 20, "maxLength": 240 },
"confidence": { "type": "number", "minimum": 0, "maximum": 1 }
},
"required": ["label", "evidence", "decision_summary", "confidence"],
"additionalProperties": false
}
}
}
}'