> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeflare.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeSafe System One

> 提交 Noul、Choice 与 Score 结构化判断。

## 原生结构化判断

入口为 `POST /v1/systemone`，使用 Codeflare Bearer 密钥与支持 `systemone` 的平台模型 ID。该协议与聊天协议隔离，请求只包含 `model`、`state`、`questions`。

```bash cURL theme={null}
curl "https://YOUR-REGION.example/v1/systemone" \
  -H "Authorization: Bearer $CODEFLARE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "MODEL_ID",
    "state": {"message": "My invoice was charged twice. Please help."},
    "questions": {
      "billing": {
        "type": "noul",
        "instructions": "Is this a billing issue?"
      },
      "team": {
        "type": "choice",
        "instructions": "Which team should handle this?",
        "criteria": {"billing": "Payments and invoices", "support": "Other requests"}
      },
      "urgency": {
        "type": "score",
        "instructions": "How time-sensitive is the request?",
        "criteria": ["Can wait", "Needs attention soon", "Needs immediate attention"]
      }
    }
  }'
```

## 问题类型

| 类型 | 用途 |
| - | - |
| `noul` | 对命题作是非判断 |
| `choice` | 在具名 criteria 之间选择 |
| `score` | 按 criteria 顺序评分 |

输入可使用字符串、JSON 对象或数组。响应保持原生 `model`、`answers`、`usage`；包含概率与 confidence，返回模型为实际服务版本。具体上下文和问题限制由上游判定。

## 限制与失败处理

不支持 `stream`、`background`、聊天 `messages`、token 计数或生成长度参数，也不做聊天协议转换。平台 `GET /v1/models` 仍为 OpenAI 格式，因此不要假设 TypeSafe SDK 的模型枚举格式与它一致。

上游 422、429、529 保留 HTTP 状态，错误详情脱敏；不自动重试。缺失或异常用量会进入未知成本核对，不应视为免费调用。

模型、上下文与价格请以控制台和 [TypeSafe 官方文档](https://docs.typesafe.ai/api)为准，文档不固定上游版本或售价。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.