Nace.AI: Drex v1.5 API Reference

About

Nace.AI Drex v1.5 evaluates text and structured JSON using Noul, Choice, and Score questions and returns typed decisions with probabilities. Infron sends synchronous JSON requests directly to Nace.AI using drex-v1.5. The state limit is 131,072 tokens, and the state plus one question can contain up to 139,264 tokens. Each request accepts 1–512 questions. This version accepts text input only. 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.

Text request — typed questions

curl --request POST "https://llm.onerouter.pro/v1/decisions" \
  --header "Authorization: Bearer $INFRON_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "nace-ai/drex-v1.5",
  "state": "My account was charged twice. Please return the extra payment.",
  "questions": {
    "needs_refund": {
      "type": "noul",
      "instructions": "Does the customer request a refund?"
    },
    "topic": {
      "type": "choice",
      "instructions": "Which topic fits this message?",
      "criteria": {
        "billing": "Charges or refunds",
        "access": "Signing in"
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this request?",
      "criteria": [
        "Low",
        "Medium",
        "High"
      ]
    }
  },
  "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": {
    "needs_refund": {
      "type": "noul",
      "noul": 0.98
    },
    "topic": {
      "type": "choice",
      "choice": "billing",
      "probabilities": {
        "billing": 0.98,
        "access": 0.02
      },
      "confidence": 0.96
    },
    "urgency": {
      "type": "score",
      "score": 1.1,
      "legend": [
        "Low",
        "Medium",
        "High"
      ],
      "probabilities": {
        "0": 0.1,
        "1": 0.7,
        "2": 0.2
      },
      "confidence": 0.7
    }
  },
  "cost": 0.000005,
  "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.000005
  },
  "id": "YOUR_REQUEST_ID",
  "model": "nace-ai/drex-v1.5",
  "provider": "nace",
  "request_id": "YOUR_REQUEST_ID",
  "service_tier": "standard",
  "usage": {
    "input_tokens": 100,
    "output_tokens": 20
  }
}

Nace upstream response structure

{
  "model": "drex-v1.5",
  "answers": {
    "needs_refund": {
      "type": "noul",
      "noul": 0.98
    },
    "topic": {
      "type": "choice",
      "choice": "billing",
      "probabilities": {
        "billing": 0.98,
        "access": 0.02
      },
      "confidence": 0.96
    },
    "urgency": {
      "type": "score",
      "score": 1.1,
      "legend": [
        "Low",
        "Medium",
        "High"
      ],
      "probabilities": {
        "0": 0.1,
        "1": 0.7,
        "2": 0.2
      },
      "confidence": 0.7
    }
  },
  "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-v1.5Public model ID; upstream selector is drex-v1.5.
statestring / number / boolean / null / object / arrayYes--131,072 state tokensShared 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.
providerobjectNo----Platform routing options.
usage.includebooleanNofalsetrue, falseInclude platform cost details.

The serialized state and questions must fit within 4,194,304 UTF-8 bytes. The state plus one question must fit within 139,264 tokens. 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

This model does not accept images, audio, video, or PDFs. Send text or structured JSON in state; file links and base64 media are not document inputs. A local UTF-8 text file can supply the state:

from pathlib import Path

state = Path("state.txt").read_text(encoding="utf-8")

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 v1.5Per 1 million tokens$0.05Free

Billing uses Nace's actual usage.input_tokens. 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.