快速开始
从零到第一个 Jev 请求,需要的东西只有两样:一个 API Key 和一个 HTTP 客户端。
1. 注册并拿到 API Key
Section titled “1. 注册并拿到 API Key”- 打开 console.typesafe.ai 注册(2026-09-15 发布时需排队等候补名单;媒体报道 9/21 起已取消候补名单)
- 在控制台创建 API Key
- 把 Key 存进环境变量,不要写进代码或前端:
export TYPESAFE_API_KEY="tsf_..." # 仅为格式示意2. 发出第一个请求
Section titled “2. 发出第一个请求”curl https://api.typesafe.ai/v1/systemone \ -H "Authorization: Bearer $TYPESAFE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "jev-latest", "state": "It kept raining all day and the match was cancelled.", "questions": { "mood": { "type": "choice", "instructions": "The overall mood of the sentence", "criteria": { "positive": "happy or hopeful", "negative": "sad or angry", "neutral": "neither" } } } }'响应(结构来自官方文档;数值为示意):
{ "model": "jev-1.13.0", "answers": { "mood": { "type": "choice", "choice": "negative", "probabilities": { "negative": 0.9, "neutral": 0.1, "positive": 0.0 }, "confidence": 0.8 } }, "usage": { "input_tokens": 60, "output_tokens": 5 }}3. 模型名怎么填
Section titled “3. 模型名怎么填”官方 models 页(2026-09-22 核验):
| 模型名 | 说明 |
|---|---|
jev-latest |
稳定最新版(推荐日常使用) |
jev-preview |
预览版(提前拿到新行为,可能变动) |
jev-1.13.0 |
固定版本(结果可复现的实验场景) |
4. 免费额度与价格
Section titled “4. 免费额度与价格”- 价格(官方):输入 $0.042/百万 token,输出免费——1 美元大约够 2400 万输入 token
- 免费额度:多家媒体(36kr 等)报道注册送 $5 额度(约 1.2 亿 token)。本站未在控制台核验,以你注册后控制台实际显示为准
- 官方 SDK 之外没有本地权重可跑;想离线实验可看社区复刻(开源生态,注意它们不是 Jev 本身)
5. 出错时看哪里
Section titled “5. 出错时看哪里”401 Key 无效 → 检查环境变量;422 请求结构错误 → 对照 schema;429 限流 → 指数退避重试;529 过载 → 同样退避重试。完整错误处理与 SDK 重试配置见API 参考。
- 用官方 SDK 写真实代码:JavaScript · Python
- 挑一个落地场景练手:应用场景