#9999th of 242 in Agent frameworks and SDKs

open-ai

PHP client for the OpenAI REST API with streaming support

Stars
2.4k
License
MIT
Last commit
Oct 2026
Last release
Oct 2026
Language
PHP
Stars, last 30 weeks+16
27 Apr 2026: 2,342 stars4 May 2026: 2,343 stars11 May 2026: 2,343 stars18 May 2026: 2,344 stars25 May 2026: 2,344 stars1 Jun 2026: 2,344 stars8 Jun 2026: 2,345 stars15 Jun 2026: 2,345 stars22 Jun 2026: 2,346 stars29 Jun 2026: 2,347 stars6 Jul 2026: 2,349 stars13 Jul 2026: 2,350 stars20 Jul 2026: 2,350 stars27 Jul 2026: 2,350 stars3 Aug 2026: 2,352 stars10 Aug 2026: 2,352 stars17 Aug 2026: 2,352 stars24 Aug 2026: 2,352 stars31 Aug 2026: 2,352 stars7 Sept 2026: 2,352 stars14 Sept 2026: 2,352 stars21 Sept 2026: 2,352 stars28 Sept 2026: 2,354 stars5 Oct 2026: 2,354 stars12 Oct 2026: 2,355 stars19 Oct 2026: 2,357 stars26 Oct 2026: 2,357 stars2 Nov 2026: 2,357 stars9 Nov 2026: 2,357 stars16 Nov 2026: 2,358 stars23 Nov 2026: 2,358 stars

2,342 on 27 Apr 20262,358 on 23 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

A community-maintained PHP library that wraps the OpenAI REST API: chat completions, Responses, images, embeddings, audio, files, fine-tuning, vector stores and batches. It needs PHP 7.4+ with cURL and JSON, and has no third-party runtime dependencies. A generic request() method covers endpoints without dedicated methods, and the base URL can be changed for OpenAI-compatible providers.

Who it is for: PHP developers calling OpenAI or compatible APIs from their apps

Strengths

  • No third-party runtime dependencies; only PHP cURL and JSON extensions
  • Generic request() reaches Containers, Evals and admin endpoints without dedicated methods
  • setBaseURL() and setApiVersion() allow OpenAI-compatible providers such as ByteDance Ark
  • Streaming callbacks receive raw SSE chunks for Chat and Responses

Weaknesses

  • Methods return raw JSON strings by default; callers must json_decode themselves
  • HTTP 4xx/5xx errors do not throw unless setThrowOnError(true) is enabled
  • No WebSocket support; a separate client is needed for that
  • tts() and translate() wrap endpoints whose documented models are deprecated or limited

What it needs

  • no GPU
  • Needs PHP 7.4+, cURL extension, JSON extension, OpenAI API key
  • Models: OpenAI API models, OpenAI-compatible APIs

What changed

  1. 6.3.1 ↗ (opens in a new tab)Security fix

    CVE-2026-109618, CVE-2026-109619. “Documentation: add a notice for the PHP runtime security advisory of 21 Oct 2026 (CVE-2026-109618, CVE-2026-109619). These are PHP engine vulnerabilities; no library code changes are required. Update…”

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in Agent frameworks and SDKs

See all 242
Also in Agent frameworks and SDKs
RankProjectScore
#97adk-javaJava library for building and orchestrating LLM agents in code1.8k starsApache-2.070 out of 100
#98skill-recorderElectron app that turns a screen recording into an agent skill5.9k stars+383 (+6.9%) in 30 daysMIT69 out of 100
#100bubPython agent kernel and app with plugins, skills, and channel integrations1.7k starsApache-2.069 out of 100
#101brainlid/langchainElixir library for calling LLMs, tools and chains from Elixir apps Live demo ↗ (opens in a new tab)1.2k starscustom license69 out of 100
#102agent-governance-toolkitPolicy enforcement, identity and audit for AI agent tool calls6.6k stars+139 (+2.1%) in 30 daysMIT68 out of 100