Models
Try both on a few of your own labelled examples and keep the cheaper one if its answers are good enough.
Endpoint and authentication
lk_...) as a Bearer token, the same key you use for chat.
The endpoint isn’t under
/openai/v1. If your app already uses https://api.lyceum.technology/openai/v1 for chat, send decisions to https://api.lyceum.technology/v1/systemone instead. The OpenAI SDKs have no System One client, so send a plain HTTP request.Quickstart
- Python
- curl
Request fields
Every question has a
type and instructions, the question itself in plain words. Give every question non-empty instructions.
Question types
A
score answer can be a decimal. With 3 levels it lies between 0 and 2: probabilities of 0.1, 0.7 and 0.2 give a score of 1.1.
Ask several questions at once
All questions in a request are about the same state, so you pay for the state once. This example sends a JSON record and asks one question of each type:Use the answers
- Set thresholds from your own data. Run a set of labelled examples and pick the
noulcut-off where the cost of a wrong yes and a wrong no balance for your use case. A spam filter and a fraud alert need different cut-offs. - Act on
confidence. Send answers with low confidence to a person or a fallback path, and act automatically on the rest. - Read the full distribution when it matters. Two close
probabilitiestell you the state fits both options, which a single label hides.
Write good questions
- Ask about something the state shows, such as “Does the message mention a refund?”, rather than something the model has to guess.
- Give options and levels labels that don’t overlap, and describe each one in its value.
- Add a fallback option such as
otherto everychoicequestion, so a state that fits no option has somewhere to go. - Name questions with letters, digits,
.,_and-only.
Limits
A request over a limit gets a
413 or 422 error, see Errors.
Pricing
Decision models bill input tokens only: theusage.input_tokens of each response. Output tokens are free, and a request that ends in an error isn’t billed. Your organization needs credit, the same as for chat.
Errors
Errors use this shape:error.code in the body, not on message:
The decision models work only on this endpoint. Sending one to
/openai/v1/chat/completions returns a 400.
Coming from the OpenAI Decisions API
The question types match, but the request and the answers have a different shape:Serverless inference
Chat and embeddings with the same API key.
API keys
Create the key you send as the Bearer token.