SHVYDKO / DOCUMENTATION

Your first request.

Send the model context and named questions. You define the response format.

01Open the console

Sign in or create an account to open your workspace.

02Try an example

Choose a scenario in the Playground, edit the context and run the request.

03Connect the API

Create a key under API keys. Store it on your server.

request.json
{
  "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.

Terminal
curl "$SHVYDKO_BASE_URL/v1/systemone" \
  -H "Authorization: Bearer $SHVYDKO_API_KEY" \
  -H "Content-Type: application/json" \
  --data @request.json

One 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.

questions.team
{
  "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.

questions.impact
{
  "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.

questions.human_review
{
  "type": "noul",
  "instructions": "Under the stated policy, this request requires urgent human review."
}

API reference

POST/v1/systemone
FieldTypePurpose
stateJSONRequired shared context.
questionsobjectOne or more named questions.
questions.*.typestringchoice, score or noul.
questions.*.instructionsstringWhat to assess in the context.
questions.*.criteriaobject / arrayChoice 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.

evaluate.py
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.

Add a path for uncertain cases.

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.

Share a request

In the Playground, select Share and choose who can access the request before creating the link. By default, only signed-in members of your organization can access the context and questions.

Anyone with the link makes the request accessible without signing in. This option is available if your organization allows public links. Check that the data can be shared before publishing. The author or an administrator can delete the link under Shared requests.

Errors and limits

SituationWhat to check
Authentication errorWhether the API key is valid and the Bearer header is present.
Request rejectedThe JSON structure, question types, criteria and server message.
Available limit reachedAccess and balance in the console. Retry only after resolving the cause.
Model temporarily unavailableThe 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.

NEXTBusiness examples in English