TypeSafe System One
curl --request POST \
--url https://api.omniall.ai/typesafe/v1/systemone \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "jev-1.14.0",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": [
"Calm",
"Frustrated",
"Very angry"
]
},
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
}
}
}
'import requests
url = "https://api.omniall.ai/typesafe/v1/systemone"
payload = {
"model": "jev-1.14.0",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["Calm", "Frustrated", "Very angry"]
},
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
}
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'jev-1.14.0',
state: 'Help! My payouts have been failing for 3 days.',
questions: {
department: {
type: 'choice',
instructions: 'Which team should handle this?',
criteria: {
billing: 'Payments, invoicing, refunds',
technical: 'Bugs, outages, integrations',
sales: 'Pricing, upgrades, new accounts'
}
},
frustration: {
type: 'score',
instructions: 'How frustrated is the customer?',
criteria: ['Calm', 'Frustrated', 'Very angry']
},
is_urgent: {type: 'noul', instructions: 'Does this convey urgency?'}
}
})
};
fetch('https://api.omniall.ai/typesafe/v1/systemone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omniall.ai/typesafe/v1/systemone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'jev-1.14.0',
'state' => 'Help! My payouts have been failing for 3 days.',
'questions' => [
'department' => [
'type' => 'choice',
'instructions' => 'Which team should handle this?',
'criteria' => [
'billing' => 'Payments, invoicing, refunds',
'technical' => 'Bugs, outages, integrations',
'sales' => 'Pricing, upgrades, new accounts'
]
],
'frustration' => [
'type' => 'score',
'instructions' => 'How frustrated is the customer?',
'criteria' => [
'Calm',
'Frustrated',
'Very angry'
]
],
'is_urgent' => [
'type' => 'noul',
'instructions' => 'Does this convey urgency?'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omniall.ai/typesafe/v1/systemone"
payload := strings.NewReader("{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omniall.ai/typesafe/v1/systemone")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omniall.ai/typesafe/v1/systemone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model": "jev-1.14.0",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.88,
"technical": 0.12,
"sales": 0
},
"confidence": 0.81
},
"frustration": {
"type": "score",
"score": 1.05,
"legend": {
"0": "Calm",
"1": "Frustrated",
"2": "Very angry"
},
"probabilities": {
"0": 0,
"1": 0.95,
"2": 0.05
},
"confidence": 0.92
},
"is_urgent": {
"type": "noul",
"noul": 0.95
}
},
"usage": {
"input_tokens": 318,
"output_tokens": 34
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}TypeSafe / Jev
TypeSafe System One
TypeSafe 官方 System One 请求。
传入共用的 state,以及一组问题(noul / choice / score)。
每道题针对同一份 state 独立作答。
上下文上限 64k tokens;state + 最长一题 ≤ 32k
(带 TypeSafe-Danger-Zone-Long-Context: true 时可到 262k)。
POST
/
typesafe
/
v1
/
systemone
TypeSafe System One
curl --request POST \
--url https://api.omniall.ai/typesafe/v1/systemone \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "jev-1.14.0",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": [
"Calm",
"Frustrated",
"Very angry"
]
},
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
}
}
}
'import requests
url = "https://api.omniall.ai/typesafe/v1/systemone"
payload = {
"model": "jev-1.14.0",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments, invoicing, refunds",
"technical": "Bugs, outages, integrations",
"sales": "Pricing, upgrades, new accounts"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["Calm", "Frustrated", "Very angry"]
},
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
}
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'jev-1.14.0',
state: 'Help! My payouts have been failing for 3 days.',
questions: {
department: {
type: 'choice',
instructions: 'Which team should handle this?',
criteria: {
billing: 'Payments, invoicing, refunds',
technical: 'Bugs, outages, integrations',
sales: 'Pricing, upgrades, new accounts'
}
},
frustration: {
type: 'score',
instructions: 'How frustrated is the customer?',
criteria: ['Calm', 'Frustrated', 'Very angry']
},
is_urgent: {type: 'noul', instructions: 'Does this convey urgency?'}
}
})
};
fetch('https://api.omniall.ai/typesafe/v1/systemone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omniall.ai/typesafe/v1/systemone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'jev-1.14.0',
'state' => 'Help! My payouts have been failing for 3 days.',
'questions' => [
'department' => [
'type' => 'choice',
'instructions' => 'Which team should handle this?',
'criteria' => [
'billing' => 'Payments, invoicing, refunds',
'technical' => 'Bugs, outages, integrations',
'sales' => 'Pricing, upgrades, new accounts'
]
],
'frustration' => [
'type' => 'score',
'instructions' => 'How frustrated is the customer?',
'criteria' => [
'Calm',
'Frustrated',
'Very angry'
]
],
'is_urgent' => [
'type' => 'noul',
'instructions' => 'Does this convey urgency?'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omniall.ai/typesafe/v1/systemone"
payload := strings.NewReader("{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omniall.ai/typesafe/v1/systemone")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omniall.ai/typesafe/v1/systemone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"jev-1.14.0\",\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"questions\": {\n \"department\": {\n \"type\": \"choice\",\n \"instructions\": \"Which team should handle this?\",\n \"criteria\": {\n \"billing\": \"Payments, invoicing, refunds\",\n \"technical\": \"Bugs, outages, integrations\",\n \"sales\": \"Pricing, upgrades, new accounts\"\n }\n },\n \"frustration\": {\n \"type\": \"score\",\n \"instructions\": \"How frustrated is the customer?\",\n \"criteria\": [\n \"Calm\",\n \"Frustrated\",\n \"Very angry\"\n ]\n },\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this convey urgency?\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model": "jev-1.14.0",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.88,
"technical": 0.12,
"sales": 0
},
"confidence": 0.81
},
"frustration": {
"type": "score",
"score": 1.05,
"legend": {
"0": "Calm",
"1": "Frustrated",
"2": "Very angry"
},
"probabilities": {
"0": 0,
"1": 0.95,
"2": 0.05
},
"confidence": 0.92
},
"is_urgent": {
"type": "noul",
"noul": 0.95
}
},
"usage": {
"input_tokens": 318,
"output_tokens": 34
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}{
"detail": {
"error_type": "validation_error",
"message": "questions.refund.type: expected one of 'noul', 'choice', 'score'"
}
}题型说明
type | criteria | 答案字段 |
|---|---|---|
noul | 可选 { true, false } | noul = 「是」的概率 |
choice | 必填选项映射(≤ 255) | choice、probabilities、confidence |
score | 必填有序数组(2–10 档) | score、legend、probabilities、confidence |
state 与 instructions 可以是字符串、对象或数组。questions 的键名会原样出现在 answers 中。
接入指南:TypeSafe Jev API。请求头
请求体
application/json