System One

Evaluate typed questions with a System One model.

01概述

TypeSafe System One-compatible endpoint. Provide a state and one or more independent typed questions; CAPI routes the request through the workspace's configured evaluation channel, applies the same key scope and billing as /evaluate, and returns typed answers with CAPI cost metadata.

POST/api/v1/systemone
Base URL https://capi.minapp.xinAPI 版本 v1认证方式 Bearer YOUR_API_TOKEN

02参数

名称类型说明
model*stringAn enabled evaluation model ID, e.g. typesafe-ai/jev.
state*string | object | arrayText or structured JSON state to evaluate.
questions*objectMap of question IDs to questions of type noul, choice, or score. Up to 20 questions per request.

03请求体

JSON
{
  "model": "typesafe-ai/jev",
  "state": { "message": "I was charged twice for my subscription." },
  "questions": {
    "refund_requested": {
      "type": "noul",
      "instructions": "Does the customer ask for a refund?"
    },
    "urgency": {
      "type": "choice",
      "instructions": "How urgent is the issue?",
      "criteria": {
        "low": "No immediate impact",
        "high": "Blocking with financial loss"
      }
    }
  }
}

04说明

  • Requires the llm.evaluate scope on the API key.
  • This endpoint accepts the TypeSafe question types noul, choice, and score. Use /api/v1/evaluate for CAPI's additional boolean question type or other evaluation providers.
  • Validation failures return 422. The request uses CAPI workspace model access, channel routing, usage accounting, and billing.

示例

System One

cURL
curl -X POST https://capi.minapp.xin/api/v1/systemone \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"typesafe-ai/jev","state":"I was charged twice.","questions":{"refund_requested":{"type":"noul","instructions":"Does the customer ask for a refund?"}}}'
HTTP 200· OK
{
  "model": "typesafe-ai/jev",
  "answers": {
    "refund_requested": { "type": "noul", "noul": 0.97 },
    "urgency": {
      "type": "choice",
      "choice": "high",
      "probabilities": { "low": 0.08, "high": 0.92 },
      "confidence": 0.84
    }
  },
  "usage": { "input_tokens": 52, "output_tokens": 24 },
  "cost": { "amount": 0.0001, "currency": "USD" }
}