Docs
OfficialJev Repos & SDKs
Python SDK Usage
The full usage guide for the Python SDK, covering typed calls, model selection, retries, error handling, logging, environment variables, and forward compatibility.
- Format
- Docs
- Reading time
- 2 min
- Published by
- TypeSafe AI
- Last verified
- Sep 2026
Works forJev for Scoring
Used inJev for Software & DevTools
Highlights
- Shows sync and async client.system_one calls with Noul, Choice, and Score questions.
- Documents base URL overrides for OpenRouter and the Vercel AI Gateway.
- RetryPolicy defaults are shown as max_retries 3, backoff_max 0.2, and timeout 1.0.
- Environment variables include TYPESAFE_API_KEY, TYPESAFE_BASE_URL, and TYPESAFE_DEFAULT_MODEL.
Watch out
Official but vendor-written; it notes request and response bodies are not redacted in debug logs.
Questions about this entry
Short answers drawn from the linked project or page.
Yes. The usage guide documents base URL overrides for OpenRouter and the Vercel AI Gateway, and the environment variables include TYPESAFE_API_KEY, TYPESAFE_BASE_URL, and TYPESAFE_DEFAULT_MODEL.
max_retries 3, backoff_max 0.2, and timeout 1.0 in its example policy, which differs from the RetryPolicy page's dataclass defaults, so check both. It also notes request and response bodies are not redacted in debug logs.
Pass response_model to system_one with a Pydantic model. Subclass SystemOneResponse to keep the standard fields and add typed answer attributes, or define a fresh BaseModel with the shape you want.
With response_model the attributes are typed and result.billing equals result.nouls['billing']; without it you read the grouped nouls, choices, and scores dictionaries. Both paths expose request_id.
The OpenRouter example sets base_url to https://openrouter.ai/api and model to '~typesafe/jev-latest' with an OpenRouter API key. Vercel AI Gateway and Pydantic AI Gateway variants are shown too.
Call TypeSafeClient().models.list() to inspect available models, then pass model at construction, for example model='jev'. The default model alias is jev-latest.
It must follow the TypeSafe OpenAPI spec, since the SDK speaks the same protocol. Set it with base_url on the client or the TYPESAFE_BASE_URL environment variable.
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.