Decisions API (Jev / System One)
Reference for POST /v1/decisions and the OpenRouter-compatible alias POST /api/alpha/decisions — TypeSafe Jev System One with pass-through billing.
Evaluate a state with typed questions (noul, choice, score) via TypeSafe Jev on OpenRouter. UnderSky authenticates with your API key and bills at upstream pass-through cost.
Endpoints
POST https://api.undersky.ai/v1/decisions
POST https://api.undersky.ai/api/alpha/decisions/api/alpha/decisions is a drop-in path alias matching OpenRouter's Decisions URL. Same handler, auth, RPM bucket, and billing as /v1/decisions — swap https://openrouter.ai → https://api.undersky.ai.
Authentication
Use a UnderSky API key:
Authorization: Bearer sk-your-api-key
Parameters
OpenRouter-native Decisions body. Required fields:
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Jev model ID (see below). Optional openrouter/ catalog prefix. |
| state | string | object | array | Yes | Content to evaluate. |
| questions | object | Yes | Map of question id → typed question (noul / choice / score). |
Each question requires type and instructions. A choice question also requires a criteria object mapping option IDs to descriptions; a score question requires an ordered array of criteria descriptions.
Supported models
| Model ID | Name |
|---|---|
~typesafe/jev-latest | Jev Latest |
typesafe/jev-1.13 | Jev 1.13 |
openrouter/~typesafe/jev-latest | Jev Latest (OpenRouter prefix) |
openrouter/typesafe/jev-1.13 | Jev 1.13 (OpenRouter prefix) |
The optional openrouter/ prefix is stripped before the upstream call so catalog and OpenRouter-style IDs both work.
Pricing
Pass-through: charged from upstream usage (input_tokens, output_tokens, cost) in UnderSky credits. See Pricing.
Rate limits
Shares the Chat RPM tier bucket (same profile as Chat Completions). The /api/alpha/decisions alias maps to the same /v1/decisions key. See Rate Limits.
Request (curl)
curl -X POST https://api.undersky.ai/v1/decisions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "~typesafe/jev-latest",
"state": {
"ticket": "Customer paid twice for the same order",
"amount_usd": 48
},
"questions": {
"should_refund": {
"type": "noul",
"instructions": "Should we issue a full refund?"
},
"primary_reason": {
"type": "choice",
"instructions": "Primary reason category",
"criteria": {
"duplicate_charge": "The same order was charged more than once.",
"defective": "The product was defective.",
"late_delivery": "The delivery was late.",
"other": "Another reason applies."
}
},
"confidence": {
"type": "score",
"instructions": "Confidence that the refund is warranted (0-1)",
"criteria": ["A full refund is not warranted.", "A full refund is warranted."]
}
}
}'OpenRouter path alias (same body):
curl -X POST https://api.undersky.ai/api/alpha/decisions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"state": "Blank checkout page after payment redirect",
"questions": {
"is_incident": {
"type": "noul",
"instructions": "Is this a production incident?"
}
}
}'Response
Successful responses are proxied from OpenRouter and typically include answers plus usage (token counts and cost). Exact fields follow the upstream Decisions contract.
Notes
- Requires the Decisions provider to be configured on the API (
OPENROUTER_API_KEY). - Upstream timeout is 60 seconds.
- Chat / Responses / Messages remain on their own endpoints; Decisions is only for typed Jev evaluations.
Messages API (Anthropic native)
Reference for POST /v1/messages, an Anthropic-compatible endpoint for Claude and DeepSeek V4 models with streaming, tools, vision, and usage billing.
Audio Transcriptions API
Reference for POST /v1/audio/transcriptions, including file uploads, file URLs, language hints, response formats, and billing.