Nace.AI: Drex Max API Reference

About

Nace.AI Drex Max evaluates text, structured JSON, and images using Noul, Choice, and Score questions and returns typed decisions with probabilities. Infron sends synchronous JSON requests directly to Nace.AI using drex-max. Each question has a 262,144-token input limit including the shared state, images, question, and formatting. Each request accepts 1–512 questions. Drex Max also accepts up to eight PNG, JPEG, or WebP images. The API returns one JSON response without streaming or task polling.

1. Calling the API

Setup your API Key

To begin using Infron, create an account and generate your API Key.

export INFRON_KEY="YOUR_API_KEY"

Submit a request

Send JSON to POST https://llm.onerouter.pro/v1/decisions using your Infron API key.

Image request — Data URL

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "nace-ai/drex-max",
  "state": "Inspect the supplied image.",
  "images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAACXBIWXMAAAABAAAAAQBPJcTWAAAC00lEQVR4nO3TsQ0EMQzAsA/w+6/sGyJFYIicQI3OzPyg6v86AF4yAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDS1g8w57xOSDszrxOurB8AbhiANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGnrBzgzrxNYbP0AcMMApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUgzAGkGIM0ApBmANAOQZgDSDECaAUj7AIpSC/qGa+ppAAAAAElFTkSuQmCC"
  ],
  "questions": {
    "square_color": {
      "type": "choice",
      "instructions": "What is the color of the square in the image?",
      "criteria": {
        "red": "Red",
        "blue": "Blue",
        "green": "Green"
      }
    }
  },
  "provider": {
    "only": [
      "nace"
    ],
    "allow_fallbacks": false,
    "service_tier": "standard"
  },
  "usage": {
    "include": true
  }
}'

Response

These examples illustrate the response structure. Request IDs are placeholders; answers, usage, timings, and costs vary by request.

Response from Infron

{
  "answers": {
    "square_color": {
      "type": "choice",
      "choice": "red",
      "probabilities": {
        "red": 0.98,
        "blue": 0.01,
        "green": 0.01
      },
      "confidence": 0.96
    }
  },
  "cost": 0.000003,
  "cost_details": {
    "audio_cost": 0,
    "byok_cost": 0,
    "completion_cost": 0,
    "image_cost": 0,
    "native_web_search_cost": 0,
    "plugin_web_search_cost": 0,
    "prompt_cache_read_cost": 0,
    "prompt_cache_write_1_h": 0,
    "prompt_cache_write_5_min": 0,
    "prompt_cache_write_cost": 0,
    "reasoning_cost": 0,
    "tools_cost": 0,
    "video_cost": 0,
    "discount_rate": 1,
    "is_byok": false,
    "prompt_cost": 0.000003
  },
  "id": "YOUR_REQUEST_ID",
  "model": "nace-ai/drex-max",
  "provider": "nace",
  "request_id": "YOUR_REQUEST_ID",
  "service_tier": "standard",
  "usage": {
    "input_tokens": 100,
    "output_tokens": 20
  }
}

Nace upstream response structure

{
  "model": "drex-max",
  "answers": {
    "square_color": {
      "type": "choice",
      "choice": "red",
      "probabilities": {
        "red": 0.98,
        "blue": 0.01,
        "green": 0.01
      },
      "confidence": 0.96
    }
  },
  "usage": {
    "input_tokens": 100,
    "output_tokens": 20
  },
  "evaluation_time_ms": 12.3,
  "request_id": "req_YOUR_UPSTREAM_REQUEST_ID"
}

Routing and usage

provider.only=["nace"], provider.allow_fallbacks=false, and provider.service_tier="standard" select this route. usage.include=true requests platform cost details. Infron handles these platform fields; they are not sent to Nace. Input and output token counts come from the upstream response. Free output pricing does not change the reported output count.

Errors

Read error.message and retain the request ID. Nace rejects invalid questions, media, or oversized requests. Token, serialized-body, account, and media-content limits are enforced upstream. A Noul question must contain nonempty instructions or a nonempty criterion. Correct invalid inputs before sending another request.

2. Schema

Input

ParameterTypeRequiredDefaultRangeDescription
modelstringYes--nace-ai/drex-maxPublic model ID; upstream selector is drex-max.
statestring / number / boolean / null / object / arrayYes--Included in the 262,144-token per-question limitShared JSON input; the key must be present and may contain null.
questionsobjectYes--1–512 entriesMap of nonblank question IDs to typed questions.
questions.<id>.typestringYes--noul, choice, scoreQuestion type.
questions.<id>.instructionsstring / nullNo--String when suppliedEvaluation instructions; null is treated as omitted.
questions.<id>.criteriaobject / arrayFor choice and score--See Question typesLabels or an ordered rating scale.
imagesarrayNo--0–8 imagesBase64 strings, Data URLs, or same-account Nace file references.
providerobjectNo----Platform routing options.
usage.includebooleanNofalsetrue, falseInclude platform cost details.

The serialized state and questions plus nonempty images must fit within 4,194,304 UTF-8 bytes. The shared state, images, question, and formatting must fit within 262,144 tokens for each question. These are separate limits, not character counts.

Question types

Noul: yes/no probability

Supply nonempty instructions or at least one nonempty criterion. Optional criteria.true and criteria.false are strings or null. The answer contains type, noul (a probability from 0 to 1), and confidence.

Choice: classification

criteria is an object with 1–255 labels; each description is a string or null. The answer contains choice, probabilities, and confidence.

Score: ordered rating

criteria is an array with 1–255 string levels. Indices start at zero. The answer contains score, the legend array, probabilities, and confidence.

Media inputs

Supply PNG, JPEG, or WebP bytes as a base64 string or Data URL. HTTP/HTTPS URLs are not fetched. The limits are 16 MiB per decoded image, 32 MiB combined, and 40 million source pixels per image. Inline base64 also counts toward the 4 MiB serialized body limit. Nace resizes each image to at most 1,638,400 pixels. Image tokens are included in input usage. Keep media outside state and questions.

Nace also accepts objects with type="workspace_file", workspace_id, and file_id; the file must have been uploaded without a workspace by the Nace account used for this route. A file uploaded under your separate Nace account cannot be used by this route.

Create an image Data URL from local files

import base64
from pathlib import Path

image_url = "data:image/png;base64," + base64.b64encode(
    Path("image.png").read_bytes()
).decode("ascii")

Use the actual MIME type of your file. Long questions also share an aggregate budget. Nace may shorten long state before inference and rejects state beyond its selector input limit; see the current Drex Max guide.

Output

ParameterTypeRangeDescription
id, request_idstring--Platform request ID.
modelstring--Public model ID.
provider, service_tierstring--Selected route.
answersobjectRequest question IDsTyped answers from Nace.
answers.<id>.typestringnoul, choice, scoreAnswer type.
answers.<id>.noulnumber0–1Yes probability.
answers.<id>.choicestringChoice keysSelected option.
answers.<id>.scorenumber0 to levels minus 1Probability-weighted level.
answers.<id>.confidencenumber0–1Answer confidence for Noul, Choice, and Score.
answers.<id>.probabilitiesobjectValues 0–1Probability distribution.
answers.<id>.legendarray--Score level labels in order.
usage.input_tokens, usage.output_tokensintegerNon-negativeActual upstream usage.
costnumberUSDCharge when cost details are requested.
cost_detailsobject--Billing breakdown when requested.

3. Detailed Pricing

ModelBilling unitInput priceOutput price
Nace.AI Drex MaxPer 1 million tokens$0.03Free

Billing uses Nace's actual usage.input_tokens. Image tokens are included at the same input rate. There is no separate request or question charge. Nace account credits are separate from Infron account billing.

Sources: Nace models, request schema, question types, limits, pricing, and Drex Max.