Skip to content

typesafe-sdk-php

Strictly typed PHP 8.4 SDK for System One aiming for 1:1 parity with the official JS and Python SDKs.

Librarybeta

Overview

valksor's typesafe-sdk-php is an unofficial, strictly typed PHP client for System One that aims for one-to-one feature parity with the official JavaScript and Python SDKs: the same wire contract, environment configuration, retry semantics, request metadata and typed errors. It requires PHP 8.4 with curl and json extensions, has zero framework dependencies and passes PHPStan at max level.

Features include typed Noul, Choice and Score questions and answers, optional typed response models via a factory, model discovery, per-attempt timeouts and exponential backoff, request IDs and raw metadata, an injectable cURL transport for frameworks and tests, and status-specific exceptions. It is on Packagist with CI. It is the PHP sibling of the same organization's Go SDK.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat is this ticket about?billing · technical · other

How it works

  1. composer require valksor/typesafe-sdk-php.
  2. Set TYPESAFE_API_KEY and create a Client.
  3. Call systemOne with state and questions.
  4. Read typed answers or map to a response model.

Strengths

  • Parity with official SDKs.
  • PHPStan max level; strict types.
  • Injectable transport.

Caveats

  • Requires PHP 8.4.
  • Unofficial.

Getting started

composer require valksor/typesafe-sdk-php

At a glance

Type
Library
Status
beta
Language
PHP
Runtime
library (Composer)
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

  • Unofficial PHP SDK for the TypeSafe AI System One API — 1:1 parity with the official JS and Python SDKs. Not affiliated with TypeSafe AI.

    hellogumbo/awesome-jev

Frequently asked questions

Which PHP version?

PHP 8.4 or newer.

Does it need a framework?

No, it has zero framework dependencies.

Is it official?

No.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython