← Open Source

The official Python library for the TypeSafe API.

AI EngineeringAccess modelsPython
Momentum
+1stars in 24 hours+0.3%
321
Stars
57
Forks
+4
This week
2
Contributors
Created 2026-09-04 · Updated 2026-12-05 · #7611 today
Top developers
danielgafni
README

TypeSafe AI Python SDK

Python SDK for TypeSafe AI.

Quickstart

Install the SDK:

uv add typesafe-sdk

Extras (for example, typesafe-sdk[http2]) supported:

Set TYPESAFE_API_KEY in your environment, then instantiate and use the client:

from typesafe_sdk import Choice, TypeSafeClient

with TypeSafeClient() as client:
    response = client.system_one(
        state={"ticket": "I was charged twice. Please fix this ASAP."},
        questions={
            "category": Choice(
                instructions="What is this ticket about?",
                criteria={"billing": None, "technical": None, "other": None},
            ),
        },
    )

print(response.choices["category"].choice)

learn what TypeSafe is, what it can do, and how to use it in TypeSafe docs.

Documentation

Learn more in SDK docs.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store