Using Jev on OpenRouter
How to call TypeSafe Jev on OpenRouter using the /api/alpha/decisions endpoint, model identifier typesafe/jev-1.13, pricing, and Python/cURL examples.
TypeSafe Jev is available on OpenRouter under model identifier typesafe/jev-1.13 (alias: ~typesafe/jev-latest). Because Jev is a non-autoregressive decision model, it uses OpenRouter's Decisions API at POST https://openrouter.ai/api/alpha/decisions rather than /v1/chat/completions.
Quick Endpoint & Model Details
POST https://openrouter.ai/api/alpha/decisions
Authorization: Bearer <OPENROUTER_API_KEY>
Content-Type: application/json
- Model ID:
typesafe/jev-1.13 - Pricing: Same as direct API ($0.042/1M input tokens, free output tokens)
- Context: 32,000 tokens (state plus questions), per OpenRouter
- SDK Method:
openrouter.alpha.decisions.create(...) - TypeSafe SDK users: OpenRouter also serves
POST https://openrouter.ai/api/v1/systemone, so the official TypeSafe SDKs work after a base URL change
Python SDK Example
Using OpenRouter’s official Python SDK (openrouter), invoke Jev via the alpha.decisions module:
pip install openrouter
import os
from openrouter import OpenRouter
with OpenRouter(
api_key=os.environ.get("OPENROUTER_API_KEY")
) as router:
response = router.alpha.decisions.create(
model="typesafe/jev-1.13",
state={
"customer_id": "cust_8820",
"message": "My card was charged $49.00 twice on checkout. Please reverse the duplicate charge.",
"account_age_days": 180
},
questions={
"is_chargeback_risk": {
"type": "noul",
"instructions": "Is this customer expressing intent to file an external bank chargeback?",
"criteria": {
"true": "Threatens bank dispute, fraud report, or legal action.",
"false": "Standard refund inquiry or friendly billing clarification."
}
},
"routing_target": {
"type": "choice",
"instructions": "Determine the support department for this inquiry.",
"criteria": {
"billing": "Invoices, double charges, payment processing errors.",
"support": "Product usage questions, bug reports.",
"legal": "Formal compliance demands, legal notices."
}
},
"urgency": {
"type": "score",
"instructions": "Rate ticket urgency from standard to emergency.",
"criteria": [
"Standard response SLA (24 hours)",
"Elevated attention required (4 hours)",
"Immediate escalation (15 minutes)"
]
}
}
)
print("Decision Response:")
print(f"Chargeback Risk Probability: {response.answers['is_chargeback_risk'].noul:.1%}")
print(f"Assigned Team: {response.answers['routing_target'].choice} (Confidence: {response.answers['routing_target'].confidence})")
print(f"Urgency Score: {response.answers['urgency'].score}")
Direct HTTP / cURL Example
You can also call OpenRouter’s Decisions API directly using standard HTTP POST:
curl --request POST \
--url https://openrouter.ai/api/alpha/decisions \
--header "Authorization: Bearer $OPENROUTER_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "typesafe/jev-1.13",
"state": {
"query": "Upgrade enterprise subscription to 500 seats with SSO integration"
},
"questions": {
"intent": {
"type": "choice",
"instructions": "Classify sales lead intent.",
"criteria": {
"enterprise_expansion": "Adding seats, SSO, or enterprise features",
"support_request": "Help with an existing product problem",
"cancellation": "Downgrading or ending the subscription",
"spam": "Unrelated or automated messages"
}
},
"lead_score": {
"type": "score",
"instructions": "Evaluate enterprise deal potential.",
"criteria": ["low", "moderate", "high", "exceptional"]
}
}
}'
OpenRouter vs. Direct TypeSafe API
| Factor | Direct TypeSafe API (api.typesafe.ai) | OpenRouter (openrouter.ai) |
|---|---|---|
| Model Slug | jev-latest / jev-1.13.0 | typesafe/jev-1.13 |
| Token Price | $0.042 / 1M input ($0.00 output rate) | $0.042 / 1M input ($0.00 output rate) |
| Account Access | TypeSafe API key from console.typesafe.ai (TypeSafe describes access as early access) | Any OpenRouter API key; OpenRouter says there's no waitlist |
| Billing | Billed by TypeSafe | Billed to your OpenRouter account; each response includes usage.cost |
| Context | 64k tokens per request; 32k for state plus the longest question | 32,000 tokens for state plus questions |
| Latency | TypeSafe reports 70ms–500ms end to end | Neither vendor publishes the gateway overhead; measure it on your own traffic |
| Client SDKs | Official @typesafe-ai/sdk, typesafe-sdk | OpenRouter TypeScript, Python, and Go SDKs, or the TypeSafe SDKs pointed at OpenRouter |
Related Context
reference cost alternativeSources & Documentation
- OpenRouter Documentation: Jev on OpenRouter — Model ID, ~typesafe/jev-latest alias, Decisions and System One endpoints, 32,000-token context, and no-waitlist access. Checked September 26, 2026.
- OpenRouter API Reference: Submit a Decisions request — Request and response schema for POST /api/alpha/decisions.
- OpenRouter Python SDK: Alpha.Decisions — alpha.decisions.create usage in the openrouter Python package.
- OpenRouter Model Page: TypeSafe Jev 1.13 — Lists $0.042 input and $0 output per 1M tokens and a 32K context. Checked September 26, 2026.
- TypeSafe Documentation: Models — Direct API price, rate limits, and 64k/32k context budgets.
- TypeSafe AI: Introducing System One Models & Jev — Source of the 70ms–500ms end-to-end latency claim and early-access status.