decision gateway
Exactly what will be sent to POST /v1/systemone. Switch back to Form to edit.
429 with a Retry-After header.
X-Request-Id for tracing.
drex-max-v1.2 — general decision model, the default.
drex-max-finance — tuned for financial documents and statements.
drex-latest — alias that always resolves to the newest release.
404 model_not_found.
state, plus typed questions.
429 wait for Retry-After seconds.
| Method & path | Description |
|---|---|
POST /v1/systemone
|
JSON body with model, state, questions and optional images. Rate-limited.
|
POST /v1/decision
|
Alias of the endpoint above: identical schema, identical scheduling. |
GET /health
|
Liveness probe. Returns the queue depth. |
curl -X POST http://HOST/v1/systemone \
-H "Content-Type: application/json" \
-d '{
"state": "I was charged twice.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Asking for a refund?"
}
}
}'
The image variant adds images: an array of base64 data URLs.
const r = await fetch("http://HOST/v1/systemone", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
state: "I was charged twice.",
questions: {
refund: { type: "noul", instructions: "Asking for a refund?" }
}
}),
});
const { answers } = await r.json();
import requests
r = requests.post(
"http://HOST/v1/systemone",
json={
"state": "I was charged twice.",
"questions": {
"refund": {"type": "noul",
"instructions": "Asking for a refund?"}
},
},
)
print(r.json()["answers"]["refund"]["noul"])
{
"model": "drex-max-v1.2",
"answers": {
"refund": {
"type": "noul",
"noul": 0.9016,
"confidence": 0.9016
}
},
"usage": { "input_tokens": 93, "output_tokens": 34 },
"evaluation_time_ms": 162.1,
"request_id": "req_4fc844529981f453e27c309bd383e195"
}
noul is the probability of "yes". choice answers carry probabilities per label, score answers carry a position and a legend.
This endpoint is a decision wrapper: only the decision family is reachable. Pick one with
model, or omit it for the default.
| Model | Use for |
|---|---|
drex-max-v1.2 |
general decision model — the default |
drex-max-finance |
financial documents and statements |
drex-latest |
alias that resolves to the newest release |
Other drex-* and
nacedm-* ids also pass. Anything else returns
404 model_not_found before it reaches the queue.
No API key is required. If your client sends an
Authorization or
X-API-Key header it is accepted and ignored.
instructions belongs to each question, not to the request.
It may be a string, a JSON object, an array, or null. Structured instructions are how you pass a
schema or field definition alongside the question.
{
"state": { "source_text": "Invoice #4471 issued March 3, 2026 ..." },
"questions": {
"invoice_number_is_correct": {
"type": "noul",
"instructions": {
"field": { "name": "invoice_number", "type": "string" },
"extracted_value": "4471",
"question": "Does extracted_value match the field?"
}
}
}
}
There is no top-level instruction field. A bare number or boolean is rejected.
noul
|
yes/no; needs instructions or criteria |
choice
|
one label out of criteria |
score
|
graded scale; criteria is an ordered array |
All errors use one JSON envelope:
{ "error": { "type": "invalid_request_error",
"message": "questions must be a non-empty object",
"code": "validation_error",
"retryable": false },
"request_id": "req_..." }
422
|
malformed JSON, missing state or questions, unsupported image |
429
|
quota exceeded; wait Retry-After seconds, then retry |
503
|
queue full or upstream unavailable; retry with backoff |
504
|
request expired while waiting for capacity; retry later |
Other codes: body_too_large · queue_full · upstream_*