Skip to content

Python Async Client

AsyncTypeSafeClient: async system_one calls, model listing, per-call retry and timeout overrides, and an optional Pydantic response model.

Format
Docs
Published by
TypeSafe AI
Last verified
Oct 2026

Highlights

  • Use it as an async context manager. system_one takes state plus a nonempty map of Noul, Choice, and Score questions.
  • response_model parses the JSON body into a Pydantic model. Omit it and you get SystemOneResponse.
  • extra_body is shallow-merged last, so a colliding state, model, or questions key overrides the typed fields.
  • The key comes from TYPESAFE_API_KEY. Empty keys, internal whitespace, control characters, and non-ASCII are rejected.
  • client.models.list() returns names, descriptions, and release dates. transport and http_client cannot both be set.

Quickstart

python
async with AsyncTypeSafeClient() as client:
    result = await client.system_one(
        state="I was charged twice. Please help.",
        questions={
            "billing": Noul(instructions="Is this about billing?"),
            "tone": Choice(
                instructions="What is the tone?",
                criteria={"calm": None, "angry": None},
            ),
        },
    )

Watch out

Request and response bodies are not redacted in typesafe_sdk logs. Secret headers are.

Questions about this entry

Short answers drawn from the linked project or page.

Related terms

Glossary definitions related to this entry.

More Jev resources like this

How the Python SDK types questions: Noul, Choice, and Score as objects or dictionaries, including optional JSON instructions and criteria.
Jev Repos & SDKsDocs#official#docs#sdk
Official
The Python response models: SystemOneResponse groups answers by id, and records the model name, token usage, and request id.
Jev Repos & SDKsDocs#official#docs#sdk
Official
Release notes for the official Python SDK, from the 14 September 2026 public release through the Pydantic migration and the HTTP/2 extra.
Jev Repos & SDKsDocs#official#docs#sdk
Official
RetryPolicy for the Python SDK: attempt count, exponential backoff with jitter, which HTTP statuses retry, and a total time budget.
Jev Repos & SDKsDocs#official#docs#sdk
Official
The Python SDK error hierarchy: HTTP status classes, rate-limit wait hints, connection and timeout errors, and response-body validation failures.
Jev Repos & SDKsDocs#official#docs#sdk
Official
Default settings and environment variable names for the Python SDK, including the API root, model alias, and per-request timeout.
Jev Repos & SDKsDocs#official#docs#sdk
Official

From the Jev guides

Original write-ups on what this entry is for.

Closed weights have not stopped the ecosystem from rebuilding the shape in the open. API-compatible servers, retrained heads on small models, and inference-time tricks that skip generation entirely.
Jev Repos & SDKs#open-models#research#local
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai