Evaluate questions
Send any JSON state and one to 512 typed questions. Each question gets an answer with calibrated probabilities under the same id.
- Billing: only a
200is billed, at the per-input-token price. - Unknown keys: top-level keys Drex doesn't know are ignored.
Checks run in this order and stop at the first failure:
- API pause (
529) - Key and credit (
401,402) - Rate limits (
429,529) - Body validation (
422) - Model evaluation (
422for too many tokens,529when the model service does not answer within 55 seconds)
Authorization
bearerAuth Your API key from the dashboard's API Keys page: nace_sk_ followed by 43 URL-safe characters (A-Z, a-z, 0-9, _ and -), shown once when you create it. Send it as Authorization: Bearer nace_sk_... Any other value returns 401 authentication_error. An account can hold at most 3 active keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Unknown top-level keys are ignored.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/systemone" \ -H "Content-Type: application/json" \ -d '{ "model": "drex-v1.0", "state": "I was charged twice for my March invoice. Please refund one of the charges.", "questions": { "category": { "type": "choice", "instructions": "What is this support ticket about?", "criteria": { "billing": "Payments, invoices, refunds, or charges", "technical": "Bugs, errors, or outages", "account": "Login, profile, or permissions", "other": null } }, "sentiment": { "type": "score", "instructions": "How upset is the customer?", "criteria": [ "Calm", "Mildly annoyed", "Frustrated", "Angry" ] }, "wants_refund": { "type": "noul", "instructions": "Is the customer asking for a refund?" } } }'{ "model": "drex-v1.0", "answers": { "category": { "type": "choice", "choice": "billing", "confidence": 0.986, "probabilities": { "billing": 0.9895, "technical": 0.005, "account": 0.0006, "other": 0.0049 } }, "sentiment": { "type": "score", "score": 1.5306, "legend": [ "Calm", "Mildly annoyed", "Frustrated", "Angry" ], "probabilities": { "0": 0.1572, "1": 0.3516, "2": 0.2946, "3": 0.1966 }, "confidence": 0.7183 }, "wants_refund": { "type": "noul", "noul": 0.9868 } }, "usage": { "input_tokens": 106, "output_tokens": 212 }, "evaluation_time_ms": 142.6, "request_id": "req_0123456789abcdef0123456789abcdef"}