Your first request.
Send the model context and named questions. You define the response format.
Sign in or create an account to open your workspace.
Choose a scenario in the Playground, edit the context and run the request.
Create a key under API keys. Store it on your server.
{
"state": "Card payments are not working. Payment on delivery is available.",
"questions": {
"team": {
"type": "choice",
"instructions": "Which team should handle this issue?",
"criteria": {
"engineering": "Website and integration failures",
"logistics": "Delivery questions"
}
}
}
}Save this object as request.json. Set your Shvydko service address in SHVYDKO_BASE_URL without a trailing slash, and your key in SHVYDKO_API_KEY.
curl "$SHVYDKO_BASE_URL/v1/systemone" \
-H "Authorization: Bearer $SHVYDKO_API_KEY" \
-H "Content-Type: application/json" \
--data @request.jsonOne context. Several questions.
state contains the text or JSON data the model should assess. In questions , each question has its own name, which identifies its answer in the result.
- Include the rules and facts needed for the decision, without unnecessary noise.
- Specify what should happen when information is missing. For example, add a matching option to Choice.
- Calculate dates and exact amounts in code, then pass the resulting facts to the model.
Three response types
01 Choice
One option from a defined set. criteria is an object whose keys are machine-readable names and whose values explain the options. The result contains a choice, probabilities and confidence.
{
"type": "choice",
"instructions": "Which team should handle this request? Choose based on the main cause of the problem.",
"criteria": {
"engineering": "Engineering: website or integration failure",
"finance": "Finance: invoices and refunds of charged payments",
"logistics": "Logistics: shipping and delivery"
}
}02 Score
criteria is an array of levels in ascending order. The response is the expected level index: for four levels, it ranges from 0 to 3 and may be fractional.
{
"type": "score",
"instructions": "Assess how the described issue affects placing orders.",
"criteria": [
"Does not prevent placing orders",
"Makes ordering harder for one customer",
"Blocks one payment method for many customers",
"Blocks every ordering method for all customers"
]
}03 Noul
Write a statement in instructions. The response is the probability that it is true, from 0 to 1. It is not a separate explanation or a final business decision.
{
"type": "noul",
"instructions": "Under the stated policy, this request requires urgent human review."
}API reference
/v1/systemone| Field | Type | Purpose |
|---|---|---|
state | JSON | Required shared context. |
questions | object | One or more named questions. |
questions.*.type | string | choice, score or noul. |
questions.*.instructions | string | What to assess in the context. |
questions.*.criteria | object / array | Choice options or Score levels. May be omitted for Noul. |
Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. This request uses the model configured for the service. Never expose a secret key in client-side code.
import json
import os
import urllib.request
with open("request.json", encoding="utf-8") as f:
body = json.load(f)
request = urllib.request.Request(
os.environ["SHVYDKO_BASE_URL"] + "/v1/systemone",
data=json.dumps(body).encode("utf-8"),
headers={
"Authorization": "Bearer " + os.environ["SHVYDKO_API_KEY"],
"Content-Type": "application/json",
"User-Agent": "ShvydkoClient/1.0",
},
)
with urllib.request.urlopen(request) as response:
result = json.load(response)
print(result)Probability for your application logic.
Probabilities help separate automatic processing from review. Choose a threshold on your own labeled sample, taking the cost of errors into account.
Send them to a person or an additional check. A high probability on its own does not guarantee correctness. Reassess thresholds when you change the context, criteria or model.
For critical operations, final rules and authorization to act must remain in your system. The model provides an assessment; the request itself does not perform the business actions it describes.
Errors and limits
| Situation | What to check |
|---|---|
| Authentication error | Whether the API key is valid and the Bearer header is present. |
| Request rejected | The JSON structure, question types, criteria and server message. |
| Available limit reached | Access and balance in the console. Retry only after resolving the cause. |
| Model temporarily unavailable | The model connection status. Retry later with a bounded number of attempts. |
Current model token limits are returned by GET /v1/models with your Bearer API key, in the fields context.max_state and context.max_branch. The first field limits tokens in the shared context; the second limits the context together with one question, its criteria and system tokens. These are not character counts or the sum of all questions. If context.strict is true, requests exceeding the limit are rejected.
The number of questions and the JSON body size in bytes are separate API request limits. They appear above the Playground editor alongside the model limits. In early access, the workspace's daily request limit is also shown there; it resets at 00:00 UTC. Runs that fail after being sent to the model also count toward this limit. Access also depends on the service-wide daily limit. Pricing and payment availability depend on the service configuration.