System One
TypeSafe Jev(System One) 판단 전용 API.
POST /v1/systemone는 평가할 내용(state)과 타이핑된 질문 맵(questions)을 받아, 질문별로 확률·신뢰도가 붙은 구조화된 답을 반환합니다. TypeSafe Jev(System One) 모델 전용 엔드포인트이며 요청·응답은 TypeSafe 네이티브 스키마와 동일합니다. 채팅 모델이 아니라 /v1/chat/completions로 호출할 수 없습니다.
연결하기#
TypeSafe 문서의 예제를 그대로 쓰되 https://api.typesafe.ai 대신 https://apirouter.pleum.ai를, TypeSafe 키 대신 plm_ 키를 사용하세요. 바디 형식은 동일합니다.
import requests
resp = requests.post(
"https://apirouter.pleum.ai/v1/systemone",
headers={
"Authorization": "Bearer plm_...",
"Content-Type": "application/json",
},
json={
"model": "jev-latest",
"state": "Hi, I've been trying to connect my Stripe account for 3 days and I'm about to churn.",
"questions": {
"urgency": {"type": "noul", "instructions": "Does this message express urgency?"},
"team": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payment, invoices, subscription issues",
"technical": "Bugs, integrations, API errors",
"sales": null,
},
},
},
},
)
print(resp.json())const res = await fetch("https://apirouter.pleum.ai/v1/systemone", {
method: "POST",
headers: {
Authorization: "Bearer plm_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev-latest",
state: "Hi, I've been trying to connect my Stripe account for 3 days and I'm about to churn.",
questions: {
urgency: { type: "noul", instructions: "Does this message express urgency?" },
team: {
type: "choice",
instructions: "Which team should handle this?",
criteria: {
billing: "Payment, invoices, subscription issues",
technical: "Bugs, integrations, API errors",
sales: null,
},
},
},
}),
});
const data = await res.json();
console.log(data.answers.urgency.noul); // e.g. 0.999인증은 plm_ API 키를 Authorization: Bearer 헤더로 전달합니다.
요청 본문#
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 필수 | 모델 ID. 예: jev-latest. |
| state | string | object | array | 필수 | 평가할 내용 — 텍스트, 채팅 로그, 레코드 등. |
| questions | map<string, Question> | 필수 | 질문 이름 → 질문 객체. 1개 이상이어야 합니다. 이름은 답변 매핑에만 쓰이고 모델 추론에는 쓰이지 않습니다. |
| questions.*.type | "noul" | "choice" | "score" | 필수 | 질문 타입 — 아래 '질문 타입' 참고. |
| questions.*.instructions | string | object | array | 필수 | 질문 본문. |
| questions.*.criteria | object | array | 선택 | 타입별 기준 — noul은 {true, false} 설명, choice는 옵션→설명 맵(null 허용), score는 순서화된 레벨 설명 배열(2개 이상). |
curl https://apirouter.pleum.ai/v1/systemone \
-H "Authorization: Bearer $PLEUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "Hi, I'"'"'ve been trying to connect my Stripe account for 3 days.",
"questions": {
"urgency": {"type": "noul", "instructions": "Does this message express urgency?"}
}
}'질문 타입#
noul — 참/거짓 확률. 0~1 사이 noul 값을 반환합니다.
choice — 선택지 분류. 최상위 choice와 합이 1인 probabilities, 파생 confidence를 반환합니다.
score — 기준표 채점. 확률 가중 score(레벨 사이에도 놓일 수 있음), legend, probabilities를 반환합니다.
응답#
응답의 answers는 요청의 질문 이름과 같은 키로 답을 돌려줍니다. 질문들은 서로 독립·병렬로 평가되므로 복잡한 판단은 원자적 질문으로 쪼개 한 번의 호출로 묶는 것이 권장됩니다(TypeSafe 공식 가이드). usage는 실측 토큰, cost는 PleumRouter 확장(KRW 비용·환율·마크업)입니다.
{
"model": "jev-latest",
"answers": {
"urgency": {"type": "noul", "noul": 0.999},
"team": {
"type": "choice",
"choice": "billing",
"probabilities": {"billing": 0.84, "technical": 0.159, "sales": 0.001},
"confidence": 0.84
}
},
"usage": {"input_tokens": 312, "output_tokens": 48},
"cost": {"usd": 0.0000187, "krw": 0.03, "fx_rate": 1525.0, "markup_rate": 0.43}
}참고: Jev는 영어에서 가장 정확하며 한국어를 포함한 CJK 언어는 정확도가 낮을 수 있습니다(TypeSafe 공식 고지). 중요한 판단은 영어 state·instructions로 작성하는 것을 권장합니다.
과금 방식#
과금은 응답 usage.input_tokens 실측 기반 입력 토큰 종량입니다(출력 토큰은 무과금). 요청 시점에는 보수적 추정치로 크레딧이 잠기고 정산 시 실측으로 확정됩니다.