决策 API

Jev API 在代码里做类型化决策

Jev 是 TypeSafe AI 的 System One 模型。它返回带概率的 Noul、Choice 或 Score,而不是文本。在这里获取密钥,一次 POST 即可调用,无需候补。

{
  "model": "jev-1.13",
  "state": "I was charged twice for my subscription.",
  "questions": {
    "refund": {
      "type": "noul",
      "instructions": "Is the customer asking for money back?"
    }
  }
}

新账号送 2 次免费调用 · 每次成功调用 1 积分 · 失败调用免费

示例

八个可以直接跑的决策

悬停卡片可看请求。复制,或在试用台打开。

空白结账页该给谁

Choice 返回负责团队,以及每个团队的概率。

{
  "model": "jev-1.13",
  "state": "Checkout shows a blank page after Pay is clicked. The customer is on the live store, not a sandbox.",
  "questions": {
    "team": {
      "type": "choice",
      "instructions": "Which team should own this ticket?",
      "criteria": {
        "payments": "Checkout, billing, or payment processing.",
        "frontend": "Rendering, layout, or browser behavior.",
        "account": "Login, permissions, or profile access."
      }
    }
  }
}
在试用台打开

这是在要退款吗

Noul 返回“是”的概率,而不是一段要解析的文字。

{
  "model": "jev-1.13",
  "state": "I was charged twice for the same annual plan this morning. Please send the extra charge back.",
  "questions": {
    "refund": {
      "type": "noul",
      "instructions": "Is the customer asking for money back?"
    }
  }
}
在试用台打开

打款失败有多急

Score 把内容放在你定义的刻度上,并返回分布。

{
  "model": "jev-1.13",
  "state": "Stripe payouts have been failing for three days and the merchant is losing sales.",
  "questions": {
    "urgency": {
      "type": "score",
      "instructions": "How urgent is this ticket?",
      "criteria": [
        "Can wait for the next release",
        "Should be handled this week",
        "Blocking revenue right now"
      ]
    }
  }
}
在试用台打开

消息里在要登录凭证

Noul 概率是人工复核队列之前的门。

{
  "model": "jev-1.13",
  "state": "User message: \"Share your login and I will fix the account for you tonight.\"",
  "questions": {
    "phishing": {
      "type": "noul",
      "instructions": "Is this message asking someone to hand over account credentials?"
    }
  }
}
在试用台打开

给一条进线定性

Choice 把“有采购窗口”和“只是感兴趣”分开。

{
  "model": "jev-1.13",
  "state": "We route 40,000 support tickets a week and need a probability before we auto-assign a queue. Budget is approved this quarter.",
  "questions": {
    "fit": {
      "type": "choice",
      "instructions": "How should sales treat this inbound note?",
      "criteria": {
        "ready": "A real workflow, a volume, and a buying window.",
        "nurture": "Interest without a stated workflow or timeline.",
        "ignore": "No product fit."
      }
    }
  }
}
在试用台打开

承诺收益的上架文案

Noul 回答的是你写的政策问题,不是一篇泛泛的安全说明。

{
  "model": "jev-1.13",
  "state": "Listing text: \"Guaranteed 30% returns every month. Send crypto to this wallet to join.\"",
  "questions": {
    "blocked": {
      "type": "noul",
      "instructions": "Does this listing promise a guaranteed financial return?"
    }
  }
}
在试用台打开

续约备注里的流失风险

Score 使用你写的三档:不太会离开,到很可能取消。

{
  "model": "jev-1.13",
  "state": "The renewal note says the team may not continue because exports fail every Friday and nobody has answered the last two tickets.",
  "questions": {
    "risk": {
      "type": "score",
      "instructions": "How high is the chance this account does not renew?",
      "criteria": [
        "Unlikely to leave",
        "Unhappy, still using the product",
        "Likely to cancel"
      ]
    }
  }
}
在试用台打开

这张发票是哪种异常

Choice 可以标出超采购单、未请购明细,或两者,并给出概率。

{
  "model": "jev-1.13",
  "state": "Vendor invoice 4481 is $18,400. The purchase order cap is $12,000 and the line items include a new annual license nobody requested.",
  "questions": {
    "exception": {
      "type": "choice",
      "instructions": "Which exception should accounts payable open?",
      "criteria": {
        "over_po": "The amount is above the purchase order.",
        "unexpected_item": "A line item was not requested.",
        "both": "The amount and a line item are both wrong."
      }
    }
  }
}
在试用台打开

响应

代码可以直接分支的答案

Jev 不写一段让你去解析的文字。它返回你问的决策,以及背后的概率。

每个选项都保留概率

Choice 会给出胜出项,同时返回你定义的每个选项的概率。

一次请求里的 Noul、Choice 和 Score

最多六个问题共用一段状态,一次响应全部返回。一个是非、一个带标签的选择和一个评分,只占一次往返和 1 积分。

阈值要紧时固定模型版本

要调截止值时发送 jev-1.13。jev-latest 指向本 API 当前提供的版本。

如何调用

如何调用 Jev API

  1. 01

    创建密钥

    登录后在控制台复制密钥。试用台可以为当前账号创建一把。

  2. 02

    POST 状态和问题

    请求体包含 model、state 和问题映射。你的 id 只是标签,问题正文写在 instructions。

  3. 03

    按类型化答案分支

    读取 noul、choice 或 score。Choice 和 Score 的 confidence 说明选项是否接近。

限制

本接口的 Jev API 限制

POST /api/v1/decisions 目前接受的范围。

项目本接口
接口POST /api/v1/decisions,Bearer 密钥
模型jev-1.13(jev-latest 是别名)
每次调用的问题数1 到 6
Choice 选项数2 到 8
Score 档位数2 到 10,最低档在前
State字符串、JSON 对象或数组,最多 60,000 字符
计费每次成功调用 1 积分;失败调用免费
流式输出不支持

TypeSafe 自己的 API 是 POST https://api.typesafe.ai/v1/systemone。它接受 jev-1.13.0 这类带版本号的 id,允许最多 255 个 Choice 选项,并按输入 token 计费。

完整参考见 Jev Docs

Jev API 常见问题

什么是 Jev API?

Jev API 是软件调用 Jev(TypeSafe AI 的 System One 模型)的方式。你发送一段状态和类型化问题。Jev 返回 Noul 概率、每个选项都带概率的 Choice,或你刻度上的 Score。它不写文本。

如何获取 Jev API 密钥?

登录后在控制台创建密钥。试用台可以在你第一次运行时创建一把。新账号有 2 积分,可覆盖 2 次成功调用。没有候补名单。

一次 Jev API 调用多少钱?

一次成功的 POST /api/v1/decisions 扣 1 积分,无论带一个还是六个问题。校验错误和上游失败不扣积分。约 100 积分税前 1 美元。套餐见价格页。

这是 TypeSafe 官方 API 吗?

不是。TypeSafe AI 构建并提供 Jev。本站是独立的 API 服务:密钥、积分和支持都来自本站,而不是 TypeSafe 账号。TypeSafe 的控制台和按 token 计价请访问 typesafe.ai。

本接口与 api.typesafe.ai/v1/systemone 有何不同?

请求体结构相同:model、state 和 noul、choice 或 score 类型的 questions。这里路径是 /api/v1/decisions,密钥来自本站控制台,模型 id 是 jev-1.13 或 jev-latest。限制更紧:1 到 6 个问题、2 到 8 个 Choice 选项、2 到 10 个 Score 档位。

Noul、Choice 和 Score 有什么区别?

Noul 是带概率的是否。Choice 在你列出的选项里选一个,并返回每个选项的概率。Score 把状态放在你写的有序刻度上,最低档在前。

发出第一次决策

用其中一个示例打开试用台,或按 Jev Docs 用自己的密钥调用接口。