---
title: "Evaluate questions"
method: POST
path: "/v1/systemone"
tags: ["Evaluate"]
---

# Evaluate questions

`POST /v1/systemone`

## Request

- Base URL: `https://console.nace.ai`
- URL: `https://console.nace.ai/v1/systemone`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nace/apis/drex-api/docs/v1/systemone/post.ts> (a function with typed inputs; its response is checked against the schema)

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 `200` is 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:

1. API pause (`529`)
2. Key and credit (`401`, `402`)
3. Rate limits (`429`, `529`)
4. Body validation (`422`)
5. Model evaluation (`422` for too many tokens, `529` when the model service does not answer within 55 seconds)

## Headers

- `X-Nace-Legend` 'array' | 'object'

## Request body

- SystemOneRequest: Unknown top-level keys are ignored.
  - `state` string, required: 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.
  - `questions` object, required: Map of question id to question. - **Count:** at least 1 and at most 512 questions; `drex-max`, `drex-max-v1.1` and `drex-max-finance` allow 255 options or levels per question. - **Ids:** non-empty, and not only whitespace. - **Size:** `state` and `questions` (and `images` when it is nonempty), serialized together as JSON, must be at most 4194304 bytes. - **Token limits:** the `state` must fit the model's state limit, and the `state` plus the longest question must fit its row limit. - `drex-v1.5`: 131,072 state, 139,264 row. - `drex-v2.0`: 131,072 state, 262,144 row. - **Text only:** images, audio, video and PDFs anywhere in `state` or `questions` are rejected with a `422`. That covers base64 data URLs, raw base64 files, and OpenAI, Anthropic and Gemini media content parts. `drex-max`, `drex-max-v1.1` and `drex-max-finance` read images from the top-level `images` array instead.
  - `model` string: Optional. Which version answers the request. - **Active pinned id** (`drex-v1.5`, `drex-v2.0`): served by that version. - **`drex-latest`:** served by the version it points to, currently `drex-v2.0`. It moves to a newer version only on an announced date. - **Retired id** (`drex-v1.0` → `drex-max`, `drex-v1.1` → `drex-v1.5`): served at its successor's price and limits, and the response `model` reports the successor. - **Legacy `nacedm-latest`, or no `model`:** served like `drex-latest`. - **Not available yet:** a registered id unavailable to the API key in this environment returns `422` with issue path `model`. - **Anything else**, including an unregistered `drex-*` name or a TypeSafe SDK default such as `jev-latest`: returns `422` with issue path `model`. `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.
  - `images` union[]: `drex-max`, `drex-max-v1.1` and `drex-max-finance` only; any other model returns 422 `images require drex-max or 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. All three allow at most 255 options or levels per question, with or without images.
    - union
      - string: Base64 image bytes or a data:image/png, image/jpeg or image/webp;base64 URL. Remote URLs and paths are not supported.
      - object
        - `type` 'workspace_file', required
        - `workspace_id` string, required: The `workspace_id` an upload returned.
        - `file_id` string, required

## Response `200`

Every question answered. `usage.input_tokens` is debited from the account's balance before the response is returned.

- SystemOneResponse
  - `model` 'drex-v1.5' | 'drex-v2.0' | 'drex-max' | 'drex-max-v1.1' | 'drex-max-finance', required: The pinned version that served the request, never an alias or a retired id. It is the version `model` named, the successor of a retired id (`drex-max` for `drex-v1.0`, `drex-v1.5` for `drex-v1.1`), or the version `drex-latest` points to (currently `drex-v2.0`) when `model` is `drex-latest` or `nacedm-latest`, or is omitted. The request is billed at this version's price.
  - `answers` object, required: One answer per question, under the same ids as the request's `questions`.
  - `usage` object, required: Token counts from the model service. Only `input_tokens` is billed.
    - `input_tokens` integer, required: Tokens in `state` and `questions`, plus any images, as counted by the model. Billed at the per-token price on the Pricing page.
    - `output_tokens` integer, required: Tokens the model produced. Not billed.
    - `image_tokens` integer: Image tokens, already included in input_tokens; not an additional charge.
  - `evaluation_time_ms` number, required: Time the model service spent on this request, in milliseconds. May be fractional. Excludes network time and Drex's own checks.
  - `request_id` string, required: Identifier of this request, `req_` plus 32 hex characters. Also sent in the `x-request-id` header, and on `/v1/systemone` and `/v1/models` in `x-typesafe-request-id` too. Quote it in support requests.

## Other responses

- `401`: The `Authorization` header is missing, is not `Bearer nace_sk_...` with 43 URL-safe characters, or names a key that does not exist or was revoked.
- `402`: The account has insufficient available funds (`insufficient_credit`) or an unpaid invoice (`payment_required`). Top up or pay the invoice on the dashboard Billing page. `GET /v1/models` does not return this.
- `422`: The body is not JSON, fails validation, is over the byte limit, or is over the model's token limit. `error.issues` lists every problem. The request is not billed.
- `429`: The account is over its requests-per-minute or in-flight limit. Limits are per account and shared by all its keys and the Playground. Wait `retry-after-ms` and retry.
- `500`: An unexpected failure inside Drex. Retry once, then contact support with the `request_id`. The request is not billed.
- `529`: Not caused by the request. The API is paused, a shared capacity pool is full, the rate limiter is unreachable, or the model service did not answer. The response never includes upstream status or detail. Wait `retry-after-ms` and retry the same request.

---

[API](https://skmtc.dev/nace/apis/drex-api.md) - [All operations](https://skmtc.dev/nace/apis/drex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/drex-api/revisions/a0e62d925a61?raw)
