Quickstart
Make your first decision with the TypeSafe SDK pointed at Sieve. Only the base URL and the key change.
Sieve serves the same System One API as TypeSafe. If you already use a TypeSafe SDK, you change two things:
- Base URL:
https://api.sieve.one - Key: your Sieve API key, sent as
Authorization: Bearer <key>
You need: an email address or a Google, GitHub or Hugging Face account, and one of: Python 3.10 or newer, Node.js 22 or newer, or curl. The versions tested against Sieve are typesafe-sdk 0.7.5 (Python) and @typesafe-ai/sdk 0.7.0 (JavaScript).
1. Get a key
Sign up at dashboard.sieve.one with an email and password, or with Google, GitHub or Hugging Face. A new account goes through these screens once:
- Verify your email. Open the link we send. It works for 24 hours.
- Review our terms. Agree to the Master Customer Agreement and the Privacy Policy.
- Let's create your org. Enter the organisation name, billing country (it sets the currency and cannot be changed later), your GSTIN if you are in India (optional), and company size.
- How did you hear about us? Optional. Skip it or submit.
The console then opens. Go to API keys, create a key and copy it. The full key is shown once. See Authentication, and Sign-in and account security to turn on two-factor authentication or add a passkey.
export TYPESAFE_API_KEY="sieve_app_live_..."
export TYPESAFE_BASE_URL="https://api.sieve.one"Both TypeSafe SDKs read these two variables, so the code below needs no key or URL in it.
2. Pick a model
curl https://api.sieve.one/v1/models \
-H "Authorization: Bearer $TYPESAFE_API_KEY"Use a name from the list. sieve-latest is an alias that moves to the newest recommended version, and sieve-auto runs the cascade. The response always reports the versioned model that answered. See the model cards.
The SDK default model is jev-latest
The TypeSafe SDKs use jev-latest when you do not name a model. The hosted API does not accept that name (a product decision is pending), so always pass a model: model="sieve-latest" in Python, defaultModel: "sieve-latest" in JavaScript, or set TYPESAFE_DEFAULT_MODEL.
3. Ask a question
curl https://api.sieve.one/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sieve-latest",
"state": "I was charged twice. Please fix this ASAP.",
"questions": {
"billing": { "type": "noul", "instructions": "Is this message about billing?" }
}
}'No code yet? Use Try it
The API reference can send these requests from the browser: paste your key under Authentication and select Test Request. The key stays in the tab's memory only.
4. Read the response
{
"model": "sieve-9b-v2",
"answers": {
"billing": { "type": "noul", "noul": 0.98, "stats": {} }
},
"usage": { "input_tokens": 120, "output_tokens": 12 },
"assets_used": null
}model: the versioned model that answered, never the alias you sent (the value shown is an example).answers: one answer per question name. Each answer'stypematches its question.usage:input_tokensare billed.output_tokensare free.- The
x-typesafe-request-idresponse header carries the request ID. Quote it when you contact support.
Compression
Both TypeSafe SDKs compress request bodies of 1 KiB or more with zstd by default, and the gateway accepts it.
Python needs the zstd extra on Python 3.13 and older
On Python 3.14 zstd is in the standard library. On 3.13 and older, install typesafe-sdk[zstd]. Without it the SDK silently sends uncompressed bodies, which still works but is slower for large states.
If a proxy in front of you cannot read zstd, turn compression off. LiteLLM proxy cannot read zstd request bodies (it fails with a 500), so behind LiteLLM pass compression=False in Python or compression: false in JavaScript.
Next steps
Your first decision, in depth
All three question types in one request, and how to read each answer.
Authentication and keys
Key access levels, model and IP restrictions, expiry and rotation.
Question types
Yes/no, choice and score questions in detail.
Errors and retries
Which errors to retry, and how to make retries safe.
Last updated