APIMaster.ai

Jev / TypeSafe System One API

使用 APIMaster API Key 调用 Jev 的结构化判断接口,支持 Choice、Score 和 Noul。

Jev / TypeSafe System One

Jev 根据 state 和一组 questions 返回结构化判断。请使用原生 POST https://apimaster.ai/v1/systemone,模型 ID 为 jev-latest;它不提供聊天文本生成或流式输出。

调用示例

curl 'https://apimaster.ai/v1/systemone' \
  -H "Authorization: Bearer $APIMASTER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "jev-latest",
    "state": "The payment has failed for three days. Please help immediately.",
    "questions": {
      "urgent": {"type": "noul", "instructions": "Does this message express urgency?"},
      "department": {
        "type": "choice",
        "instructions": "Which team should handle this?",
        "criteria": {"billing": "Payment issues", "technical": "Software bugs"}
      },
      "frustration": {
        "type": "score",
        "instructions": "How frustrated is the customer?",
        "criteria": ["Calm", "Frustrated", "Very angry"]
      }
    }
  }'

state 可以是字符串、JSON 对象或数组。questions 的键由调用者命名,响应 answers 使用相同的键;所有问题共享同一个 state。

类型 用途 主要返回字段
noul 是非判断 noul:0–1 的概率
choice 从候选项中选择 choiceprobabilitiesconfidence
score 按有序等级评分 scorelegendprobabilitiesconfidence

用量与费用

成功响应保留 TypeSafe 原生 modelanswersusage.input_tokensusage.output_tokens。按上游返回的输入 token 数计费,输出免费;APIMaster 当前售价以模型广场为准。日志仍记录输出 token 数,不能据此认定输出收费。模型广场展示渠道基础价;实际扣费还会应用账户分组系数,例如默认组的 1.05 倍系数。

jev-latest 会跟随官方稳定版本,响应中的 model 显示实际版本。官方当前上下文上限为 state 加全部问题共 64k tokens,同时 state 加最长单个问题不得超过 32k。输入仅支持文本和结构化文本。

错误与兼容性

  • 使用 APIMaster API Key,不使用上游 TypeSafe Key。
  • 请求缺少字段、问题类型不合法或 stream: true 时会返回 JSON 错误。
  • 401 检查密钥;429 / 529 使用指数退避,并遵守返回的 Retry-After
  • 普通 Chat Completions 客户端不能直接调用 Jev;请使用上述原生 HTTP 请求。
  • /v1/models 保持 APIMaster 的模型列表格式,不等同于 TypeSafe SDK 的模型列表格式。

协议与限制参考:TypeSafe API模型文档