← Ana sayfa

Jev API nasıl kullanılır

Jev tek bir endpoint sunar. Bir state ve bir soru kümesi gönderirsiniz; olasılıklarla birlikte tipli cevaplar döndürür. İlk çağrınızı yapmak için ihtiyacınız olan her şey burada.

1. Endpoint

Her istek, bir Bearer token ile kimliği doğrulanan https://api.typesafe.ai/v1/systemone adresine bir POST'tur. Resmi SDK'lar anahtarınızı TYPESAFE_API_KEY ortam değişkeninden okur.

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?"
      }
    }
  }'

Using a JevTypeSafeAI hosted key?

Skip the TypeSafe waitlist. The same choice / score / noul API through our hosted endpoint, billed per input token from a prepaid balance — one jv_live_ key, no setup. Paste your key below and run this exact request against the live endpoint to confirm it works.

curl https://jevtypesafeai.com/api/v1/decide \
  -H "Authorization: Bearer $JEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "Customer: I was charged twice and nobody has replied for 3 days.",
    "questions": {
      "route":    { "type": "choice", "instructions": "Where should this go?",
                    "criteria": { "billing": "money", "bug": "broken", "account": "login" } },
      "urgency":  { "type": "score",  "instructions": "How urgent is this?",
                    "criteria": ["routine", "today", "urgent", "critical"] },
      "escalate": { "type": "noul",   "instructions": "Escalate to a human now?" }
    }
  }'
Test your key — run this exact request against the live endpoint, once:
Sends the request above to https://jevtypesafeai.com/api/v1/decide with your key and bills one tiny decision (≈ $0.00003). Your key stays in your browser. In production, keep it server-side.

Full API reference & ready-made endpoints →

2. İstek gövdesi

Üç alan:

3. Üç soru türü

choice — bir seçenek seç

255'e kadar etiketli seçenekten oluşan bir kriter haritası verin. Jev kazanan anahtarı, seçenek başına bir olasılığı ve bir güven değerini döndürür.

"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 — bir ölçekte konum

2–10 seviye açıklamasından oluşan sıralı bir kriter dizisi verin. Jev tam dağılımla birlikte (muhtemelen kesirli) bir score döndürür.

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

noul — kalibre edilmiş evet/hayır

Kriter yok — yalnızca talimatlar. Jev, 0'dan 1'e bir olasılık olan noul'u döndürür.

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

4. Yanıt

Çözümlenen modeli, bir answers haritasını ve token kullanımını geri alırsınız:

{
  "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 }
}

Tipler sabit olduğundan, sonuçlar üzerinde düz kodla dallanabilirsiniz — if (answers.escalate.noul > 0.7) — ayrıştırma yok, regex yok ve bozuk bir yanıt riski yok.

5. Limitler ve iyi uygulamalar

Anında API erişimi alın

Giriş yapın, küçük bir bakiye ön ödeyin ve dakikalar içinde bir jv_live_ anahtarı edinin — Core Decision API ve her hazır workflow endpoint'i için tek bir anahtar. Anında, self servis, kurulum yok.

API anahtarı al →Fiyatları gör

Kod yazmadan önce görmek mi istiyorsunuz? Bu sayfadaki her örnek playground'da canlı çalışır. Resmi anahtarlar ve tam dokümanlar için docs.typesafe.ai adresine bakın.

▶ Playground'da çalıştırınFiyatları gör
Jev API nasıl kullanılır — endpoint, istek formatı ve örnekler · Jev by TypeSafe AI