API
CLUB

JEV 1.13

输入是/否、选择并对您发送的状态的答案进行评分。

typesafe/jev-1.13

能力

发送一个状态和一组键入的问题,并为每个问题获取一个键入的答案。 noul 问题采用真/假描述对,并返回 0 到 1 之间的值。选择问题采用标签对象进行描述,并选择一个标签,每个标签都有一个概率。分数问题采用一系列从低到高的级别描述,并返回这些级别的加权分数。调用是同步的;不支持流式传输。 TypeSafe SDK 用户可以保留其代码:将 SDK 基本 URL 设置为 https://api.dev.pika.art,其 POST /v1/systemone 调用保持不变。输出token是免费的。

身份验证

API 密钥标头

Uika API 使用 API 密钥来验证请求。将您的密钥发送到 X-API 密钥 标题。API 密钥必须保密,不要暴露在浏览器或其他客户端代码中。请从服务端调用 API。登录后的试玩使用控制台会话,不会发送你的 API 密钥。

标题
X-API-Key: YOUR_API_KEY

端点

synchronous

发布https://api.dev.pika.art/v1/decisions

请求

POST /v1/decisions

请求

curl -X POST https://api.dev.pika.art/v1/decisions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"state": {
"customer_tier": "enterprise",
"ticket": "My checkout page shows a blank screen after I click Pay. I have tried two browsers."
},
"questions": {
"is_bug": {
"type": "noul",
"instructions": "Is the customer reporting a software defect?",
"criteria": {
"true": "The customer describes broken or unexpected product behavior.",
"false": "The customer is asking a question or requesting a feature."
}
},
"team": {
"type": "choice",
"instructions": "Which team should own this ticket?",
"criteria": {
"account": "Login, permissions, or profile issues.",
"frontend": "Rendering, layout, or browser compatibility issues.",
"payments": "Checkout, billing, or payment processing issues."
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this ticket?",
"criteria": [
"Can wait for the next release",
"Should be fixed this week",
"Blocking revenue right now"
]
}
}
}'

返回数据

json
{
"id": "gen-dec-...",
"model": "typesafe/jev-1.13-20260917",
"provider": "TypeSafe",
"answers": {
"is_bug": {
"type": "noul",
"noul": 0.96
},
"team": {
"type": "choice",
"choice": "payments",
"confidence": 0.75,
"probabilities": {
"account": 0,
"frontend": 0.16,
"payments": 0.84
}
},
"urgency": {
"type": "score",
"score": 1.99,
"confidence": 0.99,
"legend": {
"0": "Can wait for the next release",
"1": "Should be fixed this week",
"2": "Blocking revenue right now"
},
"probabilities": {
"0": 0,
"1": 0.01,
"2": 0.99
}
}
},
"usage": {
"input_tokens": 476,
"output_tokens": 70,
"cost": 0.000019992
}
}

错误

在通话中共享

错误使用传统的 HTTP 状态代码以及形状的 JSON 主体 {"message": "..."}. 密钥缺失或无效时返回 401.