Skip to content

Jev directory

Typesafeai Go

An unofficial, dependency-free Go SDK for the System One API that uses only the standard library, validates question limits client-side, and retries rate limits and server errors.
Stars
1
Language
Go
License
MIT
Reading time
3 min
Published by
Community
Author
refaldyrk
Last verified
Sep 2026

About this project

An unofficial, dependency-free Go SDK for the TypeSafe System One API (API reference). System One evaluates a piece of content (state) against one or more typed questions and returns calibrated, probability-backed answers: Noul — a yes/no question, answered with a 0-1 probability. Choice — pick one option from a fixed set, with per-option probabilities and a confidence score. Score — rate content against an ordered list of descriptive levels.

Quoted from the project's README. Read the full README.

Highlights

  • Uses only the Go standard library, so nothing extra enters the dependency tree and nothing breaks on an upstream release.
  • Validates Choice's 255-option limit and Score's 2-10 level bounds before a request ever leaves the process.
  • Unknown answer types decode to RawAnswer instead of failing the whole response, so newer servers cannot break older clients.
  • Retries 429 and 5xx responses, including TypeSafe's 529 overloaded status, with jittered exponential backoff honoring Retry-After.
  • Typed errors mirror the JavaScript SDK hierarchy, including RateLimitError with RetryAfter and AuthenticationError for 401.

Quickstart

go
client, err := typesafe.NewClient()
resp, err := client.SystemOne(ctx, &typesafe.Request{
    State: "Hi, I've been trying to connect my Stripe account for 3 days.",
    Questions: map[string]typesafe.Question{
        "is_urgent": typesafe.Noul{
            Instructions: "The message conveys urgency or time-sensitivity.",
        },
    },
})
fmt.Println(resp.Answers["is_urgent"].(typesafe.NoulAnswer).Noul)

Watch out

MIT-licensed. An unofficial SDK not affiliated with TypeSafe; requires Go 1.22 or newer and a TYPESAFE_API_KEY.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai