docs

Introduction

Sieve decision models behind a TypeSafe-compatible API. Send content and typed questions, get calibrated probabilities back.

Sieve is a family of decision models. You send a piece of content (the state) and typed questions about it; Sieve reads the state once and returns a probability for every option. It never writes text.

The hosted API at https://api.sthanika.ai speaks TypeSafe's System One contract, so the TypeSafe Python and JavaScript SDKs work once you change the base URL and the key. An OpenAI-style route, POST /v1/decisions, is also available.

Quickstart in 60 seconds

Create an API key

Sign in to the console, open API keys and create a key. Copy it straight away: the full key is shown once.

Point the TypeSafe SDK at Sieve

export TYPESAFE_API_KEY="sieve_app_live_..."
export TYPESAFE_BASE_URL="https://api.sthanika.ai"

Both TypeSafe SDKs read these variables, so the code below has no key or URL in it.

Ask a question

pip install "typesafe-sdk[zstd]"
from typesafe_sdk import Noul, TypeSafeClient

with TypeSafeClient(model="sieve-latest") as client:
    response = client.system_one(
        state="I was charged twice. Please fix this ASAP.",
        questions={"billing": Noul(instructions="Is this message about billing?")},
    )

print(response.nouls["billing"].noul)  # probability of yes, for example 0.98

Always name a model

The TypeSafe SDKs fall back to jev-latest when no model is set, and the hosted API does not accept that name. Pass sieve-latest (or another name from GET /v1/models) as shown, or set TYPESAFE_DEFAULT_MODEL.

The full quickstart covers sign-up, reading the response and compression.

Models

NameWhat it is
sieve-latestThe latest generally available model (currently sieve-9b-v2). A good default.
sieve-autoA cascade: Sieve-4B answers first and Sieve-31B is asked again for low-confidence questions. See Auto cascade.
sieve-previewA preview model (currently sieve-27b-v2). It may change without notice.
sieve-0.8b, sieve-2b, sieve-4b, sieve-9b, sieve-27b, sieve-31bOne name per model size. Each points to the current version of that size.

Every response reports the versioned model that answered, such as sieve-9b-v2, never the alias. GET /v1/models lists the names your key may use. See the model cards for each model.

Explore the docs

About these docs

  • This site sets no cookies and loads no analytics. Search runs in your browser. The API reference's Try it sends requests only to the sandbox or a gateway on your machine, and the key you paste stays in the tab's memory.
  • Prices on these pages are modelled and will change after benchmarking. See Pricing.
  • Questions or corrections: write to support@sthanika.ai.

Last updated