// the find
openai-php/client
⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
A community-maintained PHP client covering nearly the entire OpenAI REST API surface — Responses, Chat, Embeddings, Files, Fine-tuning, Skills, Containers, Realtime, and more — with typed response objects instead of raw arrays. For PHP shops (Laravel/Symfony especially) that want OpenAI integration without hand-rolling HTTP calls and JSON parsing.
Tracks OpenAI's API changes fast — skills, the shell tool, and the decisions resource are all recent OpenAI additions and already here, which says the maintainers are actually keeping up with a moving target. Every endpoint gets a typed response class with a toArray() escape hatch, so you get IDE autocomplete instead of guessing array keys. HTTP client is decoupled via PSR-18 discovery, so swapping Guzzle for Symfony's HTTP client doesn't touch library code. Streaming is implemented properly as generators for chat, responses, and transcription, not bolted on as an afterthought.
Deprecated and already-sunset OpenAI resources (Assistants, Threads, Edits, FineTunes) are still shipped and documented alongside current ones, which is dead weight for maintainers and confusing for anyone trying to figure out what's actually current. The typed-response approach means every new OpenAI field requires a new PHP class and a PR — the library structurally lags upstream, and a silently renamed/removed field surfaces as a null or warning at runtime rather than a compile error. Error handling for rate limits is a single RateLimitException with no built-in backoff/retry, so production use needs you to build that layer yourself. The README's first screen is sponsor links and social handles before any API documentation, which is a minor thing but a sign of where attention goes.