Choose a model
laya-english for English short text or laya-multilingual for multilingual input.
HOSTED MODEL · DEVELOPER API
Ask a focused question about a message and get an answer your application can use. The Laya API returns a label, a yes probability, or an ordered score instead of chat prose.
Use the English or multilingual Laya model. Requests run on the same hosted service as the playground.
Illustration only. Run the request for live probabilities.
ONE REQUEST, TYPED ANSWERS
Send model, state, and named questions to POST /api/v1/systemone. The response includes answer values, probabilities, the selected model, and token usage.
laya-english for English short text or laya-multilingual for multilingual input.
Use choice for a label, noul for a yes probability, or score for ordered levels.
Route a ticket or flag it for review using the structured answer. Inspect probabilities before automating a sensitive step.
FIRST CALL
Create a key below, keep it on your server, and send this request. The example uses the same support case as the homepage.
printf 'Paste your Laya AI API key (input hidden): '
read -rs LAYA_AI_API_KEY
printf '\n'
curl https://laya-ai.pro/api/v1/systemone \
-H "Authorization: Bearer $LAYA_AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"laya-english","state":"Checkout fails after I enter my card. I need this order today.","questions":{"team":{"type":"choice","instructions":"Which team should handle this message?","criteria":{"billing":null,"engineering":null,"support":null}},"urgent":{"type":"noul","instructions":"Does the customer mention a time-sensitive need?"}}}'
unset LAYA_AI_API_KEYThe per-question budget includes the text, instructions, and labels. Oversized input is rejected rather than silently shortened. Read the full API guide →
YOUR ACCOUNT
Each key belongs to your Laya AI account. Store it on your server and revoke it here when you no longer need it.
New eligible accounts receive five welcome credits. API calls use purchased input tokens first, then one credit per successful request when tokens are insufficient. See plans and billing details →