Route work to the right place
List your teams, tools or next actions and ask which option best fits the input.
Laya AI online playground · Jev AI
Bring a support ticket, a sales enquiry or an agent task. Explore how structured decisions could handle the next step, starting with ready-made examples.
Sign in to run Laya API requests using your account credits.
An incoming ticket
“Our checkout stopped working after the update. Customers cannot pay and we need help now.”
choiceWhere should this go?
scoreWhat priority does it need?
noulDoes it need attention now?
Illustrative workflow. Run your own request below to see actual results.
Try it online
Load a workflow, edit the input and adjust its questions. Generate decisions to inspect the answers, probabilities and request JSON.
Requests consume account credits. See the returned result for the actual credits used.
Read the Laya API integration guide01 / What you can do
Start with a decision you already make: who handles a ticket, how urgent a request is, or whether an action needs review. The playground keeps the input, questions and result together.
Change one part of the example and compare the output. When the questions fit your task, inspect the request JSON as a starting point for your own integration.
Learn about the Laya modelList your teams, tools or next actions and ask which option best fits the input.
Describe an ordered scale, from routine work to an urgent case, and inspect the assessment.
Ask a focused yes/no question and examine its probability before choosing a threshold.
02 / Workflow ideas
Use these as experiments for your own process. The playground includes examples you can edit and run.
Identify the department, assess urgency and flag customers who may need extra attention.
Review an enquiry for buying intent, budget signals and the next follow-up action.
Test moderation questions and decide which submissions should go to a human reviewer.
Assess a proposed change or tool call before deciding whether it needs manual approval.
Compare available routes for a task and decide which tool or model should handle it.
Paste a document excerpt or structured data and ask focused questions about its contents.
03 / Your first run
Load an example and try the Laya API in your browser. No local installation is needed.
Choose a preset such as Support triage, Lead scoring or Model routing, then replace the text with your own sample.
Edit instructions, choice options or scoring criteria to match the decisions your workflow needs.
Sign in, generate decisions and review the output. Use the JSON preview to understand the request you sent.
04 / Laya API
Connect your application to the Laya decision endpoint. Authenticate with your account API key, submit context and typed questions, then use the structured answers in your workflow.
Sign in, open API Keys in your account settings and create a key. Keep enough credits in your account, then send a POST request to the URL below. The API path has no language prefix, even when this page is translated.
https://thejevai.com/laya/v1/systemoneAuthorization: Bearer YOUR_API_KEY
Content-Type: application/json
Use your own application server to make API calls. Store the key in a server environment variable named LAYA_API_KEY; never put it in browser code or a public repository. The playground uses your signed-in session instead of asking for a key.
Model identifier for English-language decision workflows.
Model identifier for workflows with multilingual inputs.
Model identifier for typed decision workflows.
Set model to english, multilingual or typed-decisions. All three options accept choice, score and noul questions.
| Field | Type | How to use it |
|---|---|---|
| model | string | Required. Use english, multilingual or typed-decisions. |
| state | string | object | array | Required. Shared context for all questions: text, a JSON object or an array. |
| questions | object | Required. An object containing 1–8 questions, keyed by your own question IDs. |
| questions.<id> | object | Use a non-empty, unique ID for each question. The same ID appears in answers. |
| questions.<id>.type | choice | score | noul | Required. Select one of the three supported decision types. |
| questions.<id>.instructions | string | Required string. State clearly what this question should evaluate. |
| questions.<id>.criteria | object | array | Required for choice and score; optional for noul. Use the format described below. |
Provide 2–100 options as an object mapping labels to descriptions (string or null), or an array of labels. The answer contains the selected label and may include option probabilities.
Provide an array of 2–10 descriptions ordered from low to high. The scale begins at 0; returned scores can be fractional.
Ask a yes/no question. Optional criteria uses the keys "true" and "false" with string or null descriptions. The returned noul value is the probability of yes, not a boolean.
Set LAYA_API_KEY to the key you created. This example evaluates one message with all three question types. Run JavaScript on Node.js 18+ (as an .mjs file), or use Python 3 with its built-in urllib module; no Python package installation is needed.
export LAYA_API_KEY="YOUR_API_KEY"
curl --fail-with-body --request POST 'https://thejevai.com/laya/v1/systemone' \
--header "Authorization: Bearer $LAYA_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "english",
"state": "I was charged twice for my subscription. Please refund the extra payment today.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"billing": "Payments and refunds",
"technical": "Bugs and outages"
}
},
"priority": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Low",
"Medium",
"High"
]
},
"refund": {
"type": "noul",
"instructions": "Is the customer requesting a refund?",
"criteria": {
"true": "A refund is requested",
"false": "No refund is requested"
}
}
}
}'Check both the HTTP status and code === 0 before using the result. Success returns answers inside data.result; it does not return a chat completion or a streaming text response.
Illustrative response: decisions, token counts and latency vary with the request.
{
"code": 0,
"message": "ok",
"data": {
"result": {
"model": "english",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.97,
"technical": 0.03
}
},
"priority": {
"type": "score",
"score": 1.8,
"legend": {
"0": "Low",
"1": "Medium",
"2": "High"
}
},
"refund": {
"type": "noul",
"noul": 0.98
}
},
"usage": {
"input_tokens": 1200,
"output_tokens": 0
},
"elapsedMs": 142
},
"creditsUsed": 2
}
}Use the request and response format documented here when integrating this endpoint. If you switch to another Laya service, check its authentication and response structure and update your client as needed.
API calls and signed-in playground runs consume account credits. The response field creditsUsed shows the actual credits deducted for each request.
Maximum UTF-8 JSON body: 32 KiB. Maximum questions per request: 8. Signed-in playground requests must be at least 3 seconds apart. The inference request has a 30-second timeout; allow additional time in your client for the full HTTP response.
Read the HTTP status and message on errors. This endpoint has no idempotency key: blindly retrying after a client timeout may create another charge if the first request completed. Confirm the outcome before retrying paid requests.
Test the request in the playgroundUse your existing account credit balance for Laya API requests.
Requests consume account credits. See the returned result for the actual credits used.
Starter
Validate one real workflow, from the playground to your first API call
Pro
Connect classification, routing, and safety decisions to a production product
Enterprise
For multiple workspaces, team collaboration, and custom production integrations, with 10% extra credits
Try an example, change the input and inspect the structured answers for your workflow.
Open the playground