提供商 · TypeSafe
通过 INFRO 运行 Jev 决策。
Jev 是 TypeSafe 的 System One 模型,回答类型化的问题——是或否、一个选择、一个分数——并给出概率,不生成文本。INFRO 让这些决策与你的 LLM 调用共用同一套网关密钥、支出限额和请求记录,并在你自己的 TypeSafe 账号上运行。了解 Jev。
把 TypeSafe 的 SDK 指向 INFRO
INFRO 在相同路径上提供 TypeSafe 的端点,请求体和模型名称都相同。TypeSafe 的 SDK 从环境变量读取密钥和基础 URL,因此把它指向 INFRO 只需改两个变量,无需改代码:基础 URL,以及用 INFRO 网关密钥替换 TypeSafe 密钥。你的 TypeSafe 密钥加密保存在你的 INFRO 连接中,只会发送给 TypeSafe。
jev-latest(SDK 的默认值)和 jev-preview 的行为与在 TypeSafe 上相同,并跟随其版本发布;按照 TypeSafe 的建议,用 TYPESAFE_DEFAULT_MODEL 固定版本。每个响应的 model 会注明作答的版本。
System One 参考文档包含请求、响应和每一种错误。
TypeSafe 的 SDK,指向 INFRO
Removed: TYPESAFE_API_KEY=<your TypeSafe key>Added: TYPESAFE_API_KEY=<your INFRO gateway key>Added: TYPESAFE_BASE_URL=https://api.infro.ioAdded: TYPESAFE_DEFAULT_MODEL=jev-1.13.0 # optional: pin a version用 curl 发送同样的请求
curl https://api.infro.io/v1/systemone \
-H "Authorization: Bearer $INFRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-1.13.0",
"state": "I was charged twice. Please refund one of them.",
"questions": {
"refund_request": { "type": "noul", "instructions": "Is the customer asking for a refund?" }
}
}'INFRO 如何处理每次决策
密钥范围
首先检查网关密钥。密钥可以限定到 TypeSafe、指定的模型、某个项目和某个环境。
支出限额
在调用 TypeSafe 之前,请求的字节大小会按适用的每个支出限额进行预留——组织、项目、密钥、成员和终端客户。超出阻断式限额时请求被拒绝,TypeSafe 永远不会被调用。
你的 TypeSafe 连接
请求使用你自己的密钥发往 TypeSafe。连接了多个 TypeSafe 密钥时,请求会分散到这些密钥上;被限速或被拒绝的密钥会把请求交给下一个。
答案、费用和记录
TypeSafe 的答案原样返回,并附上作答的版本和 usage.cost:按 TypeSafe 公开价或你协商的价格计算的预估 TypeSafe 费用。每次决策都会连同其路由规则、连接、尝试次数和预估费用一起记录,其元数据可以导出到你的 OpenTelemetry 收集器。
响应包含什么
200 OK
{
"id": "req_…",
"model": "jev-1.13.0",
"answers": {
"refund_request": { "type": "noul", "noul": 0.91 }
},
"usage": {
"input_tokens": 1000,
"output_tokens": 0,
"cost": 0.000042,
"price_source": "list"
},
"route": "primary",
"route_name": null,
"provider": "typesafe",
"connection": "conn_…"
}cost 是预估的 TypeSafe 费用,按其公开价或你协商的价格计算。当作答的版本尚未收录在 INFRO 的目录中,或 TypeSafe 未报告 token 数量时,cost 为 null——即未定价,绝不是 $0。
谁收什么费
TypeSafe 按 TypeSafe 的价格向你的 TypeSafe 账号收取 Jev 的费用。它公布的 Jev 1.13 公开价为 每百万输入 token $0.042,输出免费(docs.typesafe.ai/models,核实于 2026 年 10 月 6 日)。
INFRO 对控制平面收取订阅费,模型支出零加价。INFRO 出售的任何东西都不按 token 计价。查看套餐。
开始之前值得了解
- Jev 在 POST /v1/systemone 上作答,而不是在对话补全上;OpenAI 客户端无法调用它。
- INFRO 护栏只检查对话补全。它们不读取 Jev 请求;如果护栏策略设置为拦截无法检查的端点,则会拒绝 POST /v1/systemone。
- TypeSafe 自行设定限制——每个请求 64k token,以及随需求调整的速率限制(docs.typesafe.ai/models,核实于 2026 年 10 月 6 日)。INFRO 会返回 TypeSafe 的 429 及其 Retry-After。
- 只有在你的组织开启了提示词日志时,才会存储请求和答案的内容。
- 控制台 Playground 暂不运行 Jev。
Jev 实战指南
What is Jev? TypeSafe's System One model, explained
Jev answers typed questions about your data with probabilities instead of text. How TypeSafe's System One API works, what it costs, and where it fits.
Jev use cases: where typed AI decisions fit in a company
Support triage, moderation, model routing, RAG reranking, claims and compliance: how companies can use TypeSafe's Jev, with request designs and thresholds.
How Jev cuts the cost of AI decisions: the arithmetic
Jev bills input tokens only, at $0.042 per million. Worked arithmetic for ticket triage, cascades and guardrail checks against chat models at list rates.
Jev for LLM guardrails and model routing
Using TypeSafe's Jev to screen prompts, check replies and tool calls, and pick which LLM answers: request designs, thresholds and where the checks sit.
问题
- 我需要 TypeSafe 账号吗?
- 需要。INFRO 在你自己的 TypeSafe 账号上、使用你的密钥运行 Jev,TypeSafe 直接向你收费;INFRO 不参与这笔交易。
- INFRO 会改变 Jev 的答案吗?
- 不会。TypeSafe 的答案按 TypeSafe 发送的原样返回。INFRO 在旁边附上作答的版本、预估费用、路由规则和连接。
- 能否让部分流量继续直接发往 TypeSafe?
- 可以。在 INFRO 中建立 TypeSafe 连接不会改变你的 TypeSafe 账号。直接发往 TypeSafe 的请求照常工作;INFRO 不会记录它们。