Skip to content

TypeSafe SDK Php

Unofficial PHP client for the TypeSafe System One API: strictly typed, zero framework dependencies, a cURL transport you can swap, and optional ResponseModel classes that decode answers into your own objects.

Stars
0
Language
PHP
License
MIT
Published by
Community
Author
valksor
Last verified
Oct 2026

About this project

A modern PHP client for the TypeSafe AI System One API. Typed Noul, Choice, and Score questions and their answers. Single systemOne() call with typed answer lookup methods. Optional typed response models via a ResponseModel factory. Configurable per-attempt timeouts and exponential-backoff retries. Request IDs and raw response metadata on every call. Injectable Transport (default cURL) for framework integration and tests. Strictly typed, PHPStan max level, zero framework dependencies.

Quoted from the project's README. Read the full README.

Highlights

  • responseModel: takes a class-string and your fromSystemOne() factory pulls answers into your own typed properties.
  • Exceptions map to status codes, from BadRequestError through RateLimitError to InternalServerError, plus connection and timeout errors.
  • Transport is injectable and defaults to cURL, with a 10 second default timeout per attempt and two retries with exponential backoff.
  • Zero framework dependencies, PHPStan at max level, and it requires PHP 8.4 or newer with the curl and json extensions.

Watch out

PHP 8.4 or newer with the curl and json extensions is a hard requirement. The security note on responseModel: is the one to read before wiring this into a request handler: it must be a trusted, developer-literal class name, because a dynamic class-string would invoke an arbitrary fromSystemOne() method. Model factories that throw UnexpectedValueException are rewrapped as ResponseValidationError carrying the raw response, while any other exception type propagates unchanged so a real bug is not misreported as a bad response, and unrecognized answer types are ignored. ResponseValidationError exposes the raw response, which echoes the request state and may contain sensitive data, so the README says not to log it unredacted. Releases are pinned to the official SDK version line, requiring Client::VERSION, the changelog entry and the Git tag to match, and Packagist needs its GitHub integration configured to consume that tag. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

15GitHub stars
PHP 8.2+ client for Jev that sends a state with typed noul, choice, and score questions and returns one typed answer per question ID with probabilities and usage.
Jev Repos & SDKs#community#jevbest#catalog-import
45GitHub stars
Go SDK plus a pipeline-friendly CLI for typed decisions, covering single questions, batched question maps, retries, and line-oriented filtering over stdin.
Jev Repos & SDKs#community#jevbest#catalog-import
16GitHub stars
Swift library and CLI for asking Jev typed Choice, Noul, and Score questions from Apple platforms, with answers returned alongside calibrated probabilities in one parallel request.
Jev Repos & SDKs#community#jevbest#catalog-import
9GitHub stars
Go SDK for the TypeSafe API that asks typed Noul, Choice, and Score questions about a state and returns probability distributions with confidence and typed accessors.
Jev Repos & SDKs#community#jevbest#catalog-import
8GitHub stars
Zod 4 companion that adds Jev meaning checks to shape checks: one parseAsync call sends every semantic rule as noul questions in a single request and turns probabilities into ordinary Zod issues.
Jev Repos & SDKs#community#jevbest#catalog-import
8GitHub stars
Early-alpha Haskell DSL for building Jev question packets as expressions with inferred types, exact request rendering, and exhaustive typed answer handlers.
Jev Repos & SDKs#community#jevbest#catalog-import

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