← Startseite

So nutzt du die Jev API

Jev stellt einen einzigen Endpoint bereit. Du sendest einen State und eine Reihe von Fragen; es gibt typisierte Antworten mit Wahrscheinlichkeiten zurück. Hier ist alles, was du für deinen ersten Aufruf brauchst.

1. Der Endpoint

Jede Anfrage ist ein POST an https://api.typesafe.ai/v1/systemone, authentifiziert mit einem Bearer-Token. Offizielle SDKs lesen deinen Key aus der Umgebungsvariable 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?"
      }
    }
  }'

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. Der Anfrage-Body

Drei Felder:

3. Die drei Fragetypen

choice — wähle eine Option

Gib eine criteria-Map von bis zu 255 benannten Optionen an. Jev gibt den Gewinner-Key, eine Wahrscheinlichkeit pro Option und eine Konfidenz zurück.

"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 — Position auf einer Skala

Gib ein geordnetes criteria-Array mit 2–10 Stufenbeschreibungen an. Jev gibt einen (möglicherweise bruchteiligen) score plus die vollständige Verteilung zurück.

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

noul — kalibriertes Ja/Nein

Keine criteria — nur Instructions. Jev gibt noul zurück, eine Wahrscheinlichkeit von 0 bis 1.

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

4. Die Antwort

Du erhältst das aufgelöste Modell, eine answers-Map und den Token-Verbrauch zurück:

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

Weil die Typen festgelegt sind, kannst du mit einfachem Code auf die Ergebnisse verzweigen — if (answers.escalate.noul > 0.7) — ohne Parsing, ohne Regex und ohne Risiko einer fehlerhaften Antwort.

5. Limits & bewährte Praktiken

Sofortiger API-Zugang

Melde dich an, lade ein kleines Guthaben vor und erhalte in Minuten einen jv_live_-Key — ein Key für die Core-Decision-API und jeden fertigen Workflow-Endpunkt. Sofort, self-serve, ohne Einrichtung.

API-Key holen →Preise ansehen

Willst du es sehen, bevor du Code schreibst? Jedes Beispiel auf dieser Seite läuft live im Playground. Für offizielle Keys und die vollständige Dokumentation siehe docs.typesafe.ai.

▶ Im Playground ausführenPreise ansehen
So nutzt du die Jev API — Endpoint, Anfrageformat & Beispiele · Jev by TypeSafe AI