jev

A Go client for the TypeSafe System One API and its model, Jev.
Jev does not write text. You send a state (a string, or JSON such as a ticket, a log, or the current state of a program) and one or more named questions. The call returns a typed answer and a probability for every question. Adding questions to the same call does not add a round trip. Since Jev 1.14 the state can also hold a picture, and a box question says where in it one thing is.
This module is not affiliated with TypeSafe AI. The official clients are the JavaScript SDK and the Python SDK. The HTTP contract is the System One API.
Install
Go 1.27 or newer. The only dependency is golang.org/x/time/rate.
go get github.com/kataras/jev
Please star this open source project to attract more developers so that together we can improve it even more!
Questions
| Question | You provide | You get back |
|---|
| Noul | A yes/no question | Probability of yes, from 0 to 1 |
| Choice | Named options, up to 255 | The picked option, a probability for each option, and a confidence |
| Score | An ordered list of levels, up to 10 | A position on that list (it can fall between levels), a probability for each level, and a confidence |
| Box | What to find, and in which image | One bounding box, as fractions of the image, and a confidence |
Question names are yours. They come back as the answer keys. They are not part of the prompt.
jev-latest is the default model, and that alias moves. Jev 1.14.0 came out on 2026-10-14; jev-latest still points at jev-1.13.0 and moves about a week after a release, while jev-preview already points at jev-1.14.0. The constants jev.ModelLatest, jev.ModelPreview, jev.ModelJev114, and jev.ModelJev113 hold those names. Set WithModel(jev.ModelJev114) when a later run has to hit the same model. Box questions need Jev 1.14, so pass WithModel(jev.ModelPreview) for them until jev-latest catches up. The model field of every response is the versioned id that answered. See aliases.
Usage
client, err := jev.New() // reads TYPESAFE_API_KEY
resp, err := client.SystemOne(ctx, jev.Request{
State: "I was charged twice. Please fix this ASAP.",
Questions: jev.Questions{
"billing": jev.Noul{Instructions: "Is this ticket about billing?"},
"team": jev.Choice{
Instructions: "Which team should handle this?",
Criteria: map[string]any{
"billing": "Payments, invoices, refunds",
"technical": nil, // null means the label has no description
},
},
"urgency": jev.Score{
Instructions: "How urgent is this ticket?",
Criteria: []string{"can wait", "this week", "today"},
},
},
})
billing, _ := resp.Noul("billing")
team, _ := resp.Choice("team")
urgency, _ := resp.Score("urgency")
SystemOneAs decodes the same JSON into a struct. It is a generic method, which is why this module requires Go 1.27. JSON names are case-sensitive.
type ticket struct {
Model string `json:"model"`
Answers struct {
Billing struct {
Noul float64 `json:"noul"`
} `json:"billing"`
} `json:"answers"`
}
out, err := client.SystemOneAs[ticket](ctx, req)
A full program lives in examples/quickstart.
One question
Noul, Choice, Score, and Box each send one question named answer through SystemOne. Classify is Choice with the question and the options as separate arguments. Rate is Score with the levels as a list. Box takes the instructions alone or a jev.Box. The As methods call SystemOneAs. In that JSON the question name is answer.
yes, err := client.Noul(ctx, ticket, "Is this about billing?")
team, err := client.Classify(ctx, ticket, "Which team?", map[string]any{
"billing": "Payments, invoices, refunds",
"technical": nil,
})
urgency, err := client.Rate(ctx, ticket, "How urgent?", []string{"can wait", "this week", "today"})
box, err := client.Box(ctx, map[string]any{"photo": photo}, "the coffee mug in `photo`", jev.WithModel(jev.ModelPreview))