Jev API 사용법

Jev는 단일 엔드포인트를 노출합니다. 상태와 질문 세트를 보내면, 확률과 함께 타입이 지정된 답을 돌려줍니다. 첫 호출에 필요한 모든 것이 여기 있습니다.

1. 엔드포인트

모든 요청은 https://api.typesafe.ai/v1/systemone 로의 POST이며, Bearer 토큰으로 인증합니다. 공식 SDK는 TYPESAFE_API_KEY 환경 변수에서 키를 읽습니다.

curl
curl -X POST https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-latest",
    "state": "Customer: I was charged twice and I am furious.",
    "questions": {
      "topic": {
        "type": "choice",
        "instructions": "What is the issue about?",
        "criteria": { "billing": "money problems", "bug": "broken product" }
      },
      "urgent": {
        "type": "noul",
        "instructions": "Escalate to a human now?"
      }
    }
  }'

2. 요청 본문

세 가지 필드:

3. 세 가지 질문 타입

choice — 옵션 하나 고르기

최대 255개의 라벨이 붙은 옵션의 criteria 맵을 주세요. Jev는 선택된 키, 옵션별 확률, 신뢰도를 돌려줍니다.

"topic": {
  "type": "choice",
  "instructions": "What is the primary issue?",
  "criteria": {
    "billing": "billing or payment problem",
    "bug": "the product is broken",
    "account": "login or access"
  }
}

score — 척도 위 위치

2–10단계 설명으로 이루어진 정렬된 criteria 배열을 주세요. Jev는 (소수일 수 있는) 점수와 전체 분포를 돌려줍니다.

"severity": {
  "type": "score",
  "instructions": "How urgent is this?",
  "criteria": [
    "routine",
    "handle today",
    "urgent",
    "critical, about to churn"
  ]
}

noul — 보정된 예/아니오

criteria 없이 — 지시만 주세요. Jev는 0에서 1 사이의 확률인 noul을 돌려줍니다.

"escalate": {
  "type": "noul",
  "instructions": "Escalate to a human immediately?"
}

4. 응답

해석된 모델, answers 맵, 토큰 사용량을 돌려받습니다:

{
  "model": "jev-1.13.0",
  "answers": {
    "topic":    { "type": "choice", "choice": "billing",
                  "confidence": 1.0,
                  "probabilities": { "billing": 1.0, "bug": 0.0, "account": 0.0 } },
    "severity": { "type": "score", "score": 3.0, "confidence": 1.0,
                  "legend": { "0": "routine", "3": "critical, about to churn" },
                  "probabilities": { "0": 0.0, "3": 1.0 } },
    "escalate": { "type": "noul", "noul": 0.8 }
  },
  "usage": { "input_tokens": 434, "output_tokens": 75 }
}

타입이 고정되어 있으므로, 평범한 코드로 결과에 분기할 수 있습니다 — if (answers.escalate.noul > 0.7) — 파싱도, 정규식도, 잘못된 형식의 응답 위험도 없이.

5. 한도 및 모범 사례

더 쉬운 방법을 원하시나요?

공식 Jev 액세스는 대기자 명단제입니다. 더 간단한 호스티드 방식으로 Jev를 호출하고 싶다면 — 더 높은 데모 한도, 바로 쓸 수 있는 엔드포인트, 대기자 명단 없이 — 이메일을 남기고 무엇을 만들지 알려 주세요. 만들기 전에 수요를 가늠하고 있습니다.

코드를 작성하기 전에 먼저 보고 싶으신가요? 이 페이지의 모든 예제는 플레이그라운드에서 라이브로 실행됩니다. 공식 키와 전체 문서는 docs.typesafe.ai를 참고하세요.

▶ 플레이그라운드에서 실행하기가격 보기
Jev API 사용법 — 엔드포인트, 요청 형식, 예제 · Jev by TypeSafe AI