Jev + Python
Using Jev with Python
Python is a natural home for Jev in data pipelines: label a CSV of leads, score support tickets overnight, or filter a dataset before sending it to a larger model.
Get Early Access to ClassifierHub: 2× credits in your first paid month.
A minimal example
This function routes a ticket and scores its severity with a single request.
import os
import requests
def triage(ticket: str) -> dict:
response = requests.post(
"https://openrouter.ai/api/alpha/decisions",
headers={"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"},
json={
"model": "typesafe/jev-1.13",
"state": {"ticket": ticket},
"questions": {
"team": {
"type": "choice",
"instructions": "Which team should handle `ticket`?",
"criteria": {
"billing": "Payments, invoices and refunds",
"technical": "Bugs, errors and outages",
"other": "Anything else",
},
},
"severity": {
"type": "score",
"instructions": "How severe is the problem in `ticket`?",
"criteria": [
"Question or cosmetic issue",
"Degraded, workaround exists",
"Broken, no workaround",
],
},
},
},
timeout=8,
)
response.raise_for_status()
answers = response.json()["answers"]
return {
"team": answers["team"]["choice"],
"severity": round(answers["severity"]["score"]),
}Processing a dataset
For many rows, send requests concurrently with a small worker pool (for example concurrent.futures with 5 to 10 workers), retry 429 and 5xx responses with backoff, and write results back as new columns. Store probabilities as well as labels so you can adjust thresholds later without re-running.
Spreadsheets without code
If the data lives in Excel, ClassifierHub's Excel integration lets you upload a sheet, pick a column and a decision, and download the file with result columns added. No script required.
Frequently asked questions
Related guides
Last updated 2026-09-25. ClassifierHub is an independent product built on top of the Jev decision model, accessed through OpenRouter. It is not affiliated with or endorsed by TypeSafe or OpenRouter.