System One
Evaluate typed questions with a System One model.
01Overview
TypeSafe System One-compatible endpoint. Provide a state and one or more independent typed questions; CAPI routes the request through the workspace's configured evaluation channel, applies the same key scope and billing as /evaluate, and returns typed answers with CAPI cost metadata.
POST
/api/v1/systemoneBase URL https://capi.minapp.xinAPI version v1Authentication Bearer YOUR_API_TOKEN
02Parameters
| Name | Type | Description |
|---|---|---|
| model* | string | An enabled evaluation model ID, e.g. typesafe-ai/jev. |
| state* | string | object | array | Text or structured JSON state to evaluate. |
| questions* | object | Map of question IDs to questions of type noul, choice, or score. Up to 20 questions per request. |
03Request body
JSON
{
"model": "typesafe-ai/jev",
"state": { "message": "I was charged twice for my subscription." },
"questions": {
"refund_requested": {
"type": "noul",
"instructions": "Does the customer ask for a refund?"
},
"urgency": {
"type": "choice",
"instructions": "How urgent is the issue?",
"criteria": {
"low": "No immediate impact",
"high": "Blocking with financial loss"
}
}
}
}04Notes
- Requires the llm.evaluate scope on the API key.
- This endpoint accepts the TypeSafe question types noul, choice, and score. Use /api/v1/evaluate for CAPI's additional boolean question type or other evaluation providers.
- Validation failures return 422. The request uses CAPI workspace model access, channel routing, usage accounting, and billing.
Example
System One
cURL
curl -X POST https://capi.minapp.xin/api/v1/systemone \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"typesafe-ai/jev","state":"I was charged twice.","questions":{"refund_requested":{"type":"noul","instructions":"Does the customer ask for a refund?"}}}'HTTP 200· OK
{
"model": "typesafe-ai/jev",
"answers": {
"refund_requested": { "type": "noul", "noul": 0.97 },
"urgency": {
"type": "choice",
"choice": "high",
"probabilities": { "low": 0.08, "high": 0.92 },
"confidence": 0.84
}
},
"usage": { "input_tokens": 52, "output_tokens": 24 },
"cost": { "amount": 0.0001, "currency": "USD" }
}