Drex
Evaluate questions
- Billing: only a 200 is billed, at the per-input-token price.
- Unknown keys: top-level keys Drex doesn't know are ignored.
- 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, sent as Authorization: Bearer nace_sk_...
- Where: the dashboard's API Keys page. It is shown once, when you create it.
- Format:
nace_sk_followed by 43 URL-safe characters (A-Z,a-z,0-9,_and-). - Limit: an account can hold at most 3 active keys.
- Wrong or missing key: returns
401 authentication_error.
In: header
Header Parameters
The shape of a score answer's legend: array or object. Without it, legend is an array, except for a request with an X-TypeSafe-SDK header (any non-empty value) or a User-Agent that starts with typesafe-sdk/ or langchainjs-typesafe/, which gets an object keyed by the level index. This header wins in both directions. Any other value is ignored. Only the shape changes.
"array""object"Unknown top-level keys are ignored.
Any JSON value: string, number, boolean, null, object, or array. Drex passes it to the model as is. The key must be present, but null is accepted.
Map of question id to question.
- Count: at least 1 and at most 512 questions;
drex-max-v1.1anddrex-max-financeallow 255 options or levels per question. - Ids: non-empty, and not only whitespace.
- Size:
stateandquestions(andimageswhen it is nonempty), serialized together as JSON, must be at most 4194304 bytes. - Token limits:
drex-v2.0allows 131,072 state tokens and 262,144 tokens for the state plus its longest question.drex-max-v1.1anddrex-max-financeallow 262,144 tokens across the whole packed request: state, images, every question, and formatting and decision markers. Retired model ids follow their successor's limits. - Text only: images, audio, video and PDFs anywhere in
stateorquestionsare rejected with a422. That covers base64 data URLs, raw base64 files, and OpenAI, Anthropic and Gemini media content parts.drex-max-v1.1anddrex-max-financeread images from the top-levelimagesarray instead.
1 <= properties <= 512Show child attributes
Optional. Which version answers the request.
- Active pinned id (
drex-v2.0,drex-max-v1.1,drex-max-finance): served by that version. drex-latest: served by the version it points to, currentlydrex-v2.0. It moves to a newer version only on an announced date.- Retired id (
drex-v1.0,drex-v1.1,drex-v1.5ordrex-max→drex-max-v1.1): served at its successor's price and limits, and the responsemodelreports the successor. - Legacy
nacedm-latest, or nomodel: served likedrex-latest. - Not available yet: a registered id unavailable to the API key in this environment returns
422with issue pathmodel. - Anything else, including an unregistered
drex-*name or a TypeSafe SDK default such asjev-latest: returns422with issue pathmodel.
GET /v1/models lists the models available to the requesting API key in that environment, each alias with its alias_for, and a retired id with alias_for set.
^(?:drex|nacedm)-[A-Za-z0-9.-]+$Served by drex-max-v1.1 or drex-max-finance, including retired ids that resolve to Max v1.1; any other model returns 422 images require drex-max-v1.1 or drex-max-finance. Ordered images shared by every question, placed before the state; refer to them as Image 1, Image 2 and so on. Up to 16 MiB per image and 32 MiB combined. Use workspace_file references to uploaded files for large images; inline images count toward the 4 MiB body limit. PNG, JPEG or WebP, up to 40 megapixels before resizing. Both allow at most 255 options or levels per question, with or without images.
items <= 8Show child attributes
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-v2.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-v2.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, "confidence": 0.9868 } }, "usage": { "input_tokens": 106, "output_tokens": 212 }, "evaluation_time_ms": 142.6, "request_id": "req_0123456789abcdef0123456789abcdef"}