von 0G Foundation
Laya (Convai Innovations, open weights, Apache-2.0): a non-autoregressive System One decision model, the open alternative to TypeSafe Jev. Same request and response shape as Jev (POST /decisions: model/state/questions, typed noul / choice / score answers with calibrated probabilities instead of text). Routes by language inside the model: English state to a ModernBERT-large checkpoint (512 tokens), other languages to a 100+-language mmBERT checkpoint (1024 tokens); longer state is truncated. Best with fewer than 20 options per choice question. Billed on input tokens only.
512
512 Token
Free 0G
pro 1M Token
—
N/V für Entscheidungen
curl "https://router-api.0g.ai/v1/decisions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "laya",
"state": "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which department should handle this?",
"criteria": {
"billing": "invoices, payments, refunds",
"technical": "bugs, outages",
"other": "everything else"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this?",
"criteria": ["not urgent", "soon", "blocking"]
},
"churn_risk": {
"type": "noul",
"instructions": "Does the user threaten to cancel?"
}
}
}'TEE-Verifizierung
Fordere eine On-Chain-Signaturverifizierung mit verify_tee an. Die Antwort enthält ein tee_verified-Feld im Trace.
{
"model": "laya",
"state": "Please refund the duplicate charge or we will cancel.",
"questions": {"churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel?"}},
"verify_tee": true
}Anbieter-Routing
Steuern Sie, welcher Anbieter Ihre Anfrage bearbeitet, mit den X-0G-Provider-*-Anfrage-Headern.
X-0G-Provider-Address legt einen Anbieter fest; X-0G-Provider-Identity legt fest, welcher seiner vorgelagerten Dienste für das Routing verwendet wird – beide Werte stammen aus den Feldern address und provider_identity von GET /v1/providers. Zusammen adressieren sie einen bestimmten vorgelagerten Dienst eines Anbieters. Werden beide nicht gesendet, wählt der Router genau wie zuvor anhand von Preis und Zustand aus.
curl "https://router-api.0g.ai/v1/decisions" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Address: <PROVIDER_ADDRESS>" \
-H "X-0G-Provider-Identity: <UPSTREAM>" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "laya",
"state": "Please refund the duplicate charge or we will cancel.",
"questions": {"churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel?"}}
}'Nur private Modelle
Dieses Modell ist privat. Um Anfragen an einen TEE-gestützten Anbieter zu binden, fügen Sie den Header X-0G-Provider-Trust-Mode: private hinzu. Opt-in – nicht automatisch aktiviert.
X-0G-Provider-Trust-Mode: private