typesafe_sdk_ex
Elixir SDK for TypeSafe based on the official JavaScript SDK, built on Req, with status-mapped error structs.
Overview
typesafe_sdk_ex is an Elixir client for TypeSafe based on the official JavaScript SDK and built on the Req HTTP library. TypeSafe.new reads the key and optional base URL, default model and log level from options or TYPESAFE_* environment variables, and system_one sends state with questions built by noul, choice and score helpers. list_models lists available models.
Its error handling is detailed: non-2xx responses map to specific structs (BadRequest, Authentication, PermissionDenied, NotFound, UnprocessableEntity, RateLimit with retry_after_ms, InternalServer including 529, Connection and Timeout), while configuration and question-validation problems use a generic error. The README also documents logging, telemetry and connection pool behavior. Each client has its own log level, and typed helpers build questions so request shapes are validated before sending.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | What is this ticket about? | billing · technical · other |
How it works
- Create a client with TypeSafe.new.
- Build questions with the helpers.
- Call system_one and read answers from the response map.
- Handle status-mapped errors.
Strengths
- Detailed, status-specific error structs.
- Logging, telemetry and pool controls.
- Based on the official JS SDK.
Caveats
- Responses are maps rather than typed structs.
- Community SDK; requires a key.
Getting started
{:ok, client} = TypeSafe.new() with TYPESAFE_API_KEY setAt a glance
- Type
- Library
- Status
- beta
- Language
- Elixir
- Runtime
- library
- Has code
- yes
Use cases and integrations
How curated lists describe it
Typesafe AI SDK in Elixir using Req.
hellogumbo/awesome-jev
Frequently asked questions
Which HTTP library does it use?
Req.
How are rate limits reported?
As TypeSafe.Error.RateLimit with retry_after_ms.
What is it based on?
The official TypeSafe JavaScript SDK.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython