NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1984 most downloaded on Packagist
OpenAI API client for PHP, with Responses, Chat, Images, and more
Latest stable
6.3.1
Last release 1 months ago
21 Oct 2026
Ships unpredictably
gaps range from 2 weeks to 1.6 years
Nearly every release is documented
notes for 33 of 33 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
33 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
Documentation: add a notice for the PHP runtime security advisory of 21 Oct 2026 (CVE-2026-109618, CVE-2026-109619). These are PHP engine vulnerabilit…
actions/checkout to v7, stefanzweifel/git-auto-commit-action to v7, and dependabot/fetch-metadata to v3.1.0 (#172, #173, #174).Response Object: Added getLastResponse() returning a Response object with ->status(), ->ok(), ->headers(), ->header($name), ->body(), and ->json() for
getLastResponse() returning a Response object with ->status(), ->ok(), ->headers(), ->header($name), ->body(), and ->json() for easy inspection without manual json_decode().setThrowOnError(true) and OpenAiException for throwing on HTTP 4xx/5xx responses with status code, error type, and error code.setRetries(maxRetries, baseDelayMs) with exponential backoff, jitter, and Retry-After header support for rate limits (429) and transient server errors (5xx on idempotent methods).getDecisionsUsage() reporting endpoint.Full Changelog: https://github.com/orhanerday/open-ai/compare/6.2.0...6.3.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
setThrowOnError(bool $throw = true) and OpenAiException to cleanly throw and catch API error responses (status 400+) with error type, code, and status.getLastResponse() returning a Response object with ->status(), ->ok(), ->headers(), ->header($name), ->body(), and ->json().setRetries(int $maxRetries, int $baseDelayMs = 500) with exponential backoff, jitter, and numeric/HTTP-date Retry-After support. Retry rate limits except billing/quota errors, and server errors only for effective GET/PUT/DELETE requests; exclude streaming, body/upload callbacks, custom output files, and non-returning transfers, and leave waits above 60 seconds to the application.getDecisionsUsage().Agents API (beta): sessions (create, list, retrieve, update, delete), event streaming and input events, items, turns, trace export, and environments.
OpenAI-Beta: agents=v1 for that request only; your own headers are restored afterwards.request() documentation moved under Quick start, with a pointer for endpoints without a dedicated method.See the README section "Agents API" for examples.
OpenAI-Beta: agents=v1 for that request only and restore your headers afterwards.request($method, $path, $opts, $stream, $multipart): call any API endpoint without a dedicated method, such as Containers, Evals, Administration, Vaul
request($method, $path, $opts, $stream, $multipart): call any API endpoint without a dedicated method, such as Containers, Evals, Administration, Vaults, Agents, and routes added later.See the README section "Any other endpoint" for details and examples.
request($method, $path, $opts, $stream, $multipart) for compatible REST operations without dedicated methods (Containers, Evals, Administration, Vaults, Agents, and future routes). Paths must be relative; absolute URLs are rejected.Documentation-only patch. Finalizes the changelog for the 6.0 line. No code changes since 6.0.
Documentation-only patch. Finalizes the changelog for the 6.0 line. No code changes since 6.0.
See CHANGELOG.md and MIGRATING.md.
Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in https://github.com/orhanerday/open-ai/pull/111
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.9...4.9.1
Fixing typo in the lib name in README.md by @slaFFik in https://github.com/orhanerday/open-ai/pull/74
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.7.1...4.7.2
Fix bug by @gouguoyin in https://github.com/orhanerday/open-ai/pull/68
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.7...4.7.1
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.2...3.2.1
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.2...3.2.1
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.2...3.2.1
- initial release
Removed Obsolete Endpoints: Completely purged the deprecated Answers, Searches, and Classifications endpoints.
A major release focusing on modernizing the library, improving universal compatibility, and cleaning up legacy code.
setApiVersion() to support alternative paths (like Google Gemini and ByteDance Ark). (#152)setCURLOptions() to easily bypass SSL or inject custom timeouts/proxies. (#149)Webhook class with robust signature validation.setApiKey() for better dependency injection. (#156)gpt-4o-mini.Pest, separating live endpoints from mocked transport tests.openai-php/client.Answers, Searches, and Classifications endpoints.composer require orhanerday/open-ai
setApiKey() for deferred configuration and key replacement, and reject requests without configured authentication (#156).Update README.md by @orhanerday in https://github.com/orhanerday/open-ai/pull/154
Full Changelog: https://github.com/orhanerday/open-ai/compare/5.2...5.3
Support for OpenAI-Beta assistants v2 and streaming. by @thomasdv in https://github.com/orhanerday/open-ai/pull/141
Full Changelog: https://github.com/orhanerday/open-ai/compare/5.1...5.2
Text to Speech by @yakupseymen in https://github.com/orhanerday/open-ai/pull/133
Full Changelog: https://github.com/orhanerday/open-ai/compare/5.0...5.1
Thanks to @joacir's contribution, New endpoints have been added. I appreciated his time and effort. Thank you so much.
Thanks to @joacir's contribution, New endpoints have been added. I appreciated his time and effort. Thank you so much.
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.9.1...5.0
Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/orhanerday/open-ai/pull/106
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.8...4.9
Update README.md by @orhanerday in https://github.com/orhanerday/open-ai/pull/94
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.7.2...4.8
Add setBaseURL and setHeader methods by @gouguoyin in https://github.com/orhanerday/open-ai/pull/67
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.6...4.7
Fix calling curl_getinfo after curl_close() in sendRequest by @mahadsprouttech in https://github.com/orhanerday/open-ai/pull/63
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.5...4.6
Audio Feature added Full Changelog: https://github.com/orhanerday/open-ai/compare/4.1...4.5
Audio Feature added
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.1...4.5
feat: support set proxy by @djunny in https://github.com/orhanerday/open-ai/pull/61
Proxy support
Full Changelog: https://github.com/orhanerday/open-ai/compare/4.0...4.1
Update CHANGELOG.md by @marcosegato in https://github.com/orhanerday/open-ai/pull/55
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.5...4.0
Fix "export-ignore" does not work by @assert6 in https://github.com/orhanerday/open-ai/pull/43
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.4...3.5
Add organization support. by @orhanerday in https://github.com/orhanerday/open-ai/pull/40
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.3...3.4
36 feature request support stream by @orhanerday in https://github.com/orhanerday/open-ai/pull/37
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.2.1...3.3
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.2.1...3.3
Ability to set a timeout value in seconds by @dsampaolo in https://github.com/orhanerday/open-ai/pull/31
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.1...3.2
Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 by @dependabot in https://github.com/orhanerday/open-ai/pull/28
Full Changelog: https://github.com/orhanerday/open-ai/compare/3.0...3.1
Add deprecated methods by @orhanerday in https://github.com/orhanerday/open-ai/pull/27
Full Changelog: https://github.com/orhanerday/open-ai/compare/2.3...3.0
Fix documentation for Url Class by @Muchwat in https://github.com/orhanerday/open-ai/pull/18
Full Changelog: https://github.com/orhanerday/open-ai/compare/2.2...2.3
API for content filter, unit testing fixed and added documentation fo… by @bashar94 in https://github.com/orhanerday/open-ai/pull/17
Full Changelog: https://github.com/orhanerday/open-ai/compare/2.1...2.2
Full Changelog: https://github.com/orhanerday/open-ai/compare/2.1...2.2
Adding more capabilities by @orhanerday in https://github.com/orhanerday/open-ai/pull/11
Full Changelog: https://github.com/orhanerday/open-ai/compare/2.0...2.1
Orhanerday/open-ai now supports file uploads
Full Changelog: https://github.com/orhanerday/open-ai/compare/1.1...2.0
Allow PHP8 by @mydnic in https://github.com/orhanerday/open-ai/pull/2
Full Changelog: https://github.com/orhanerday/open-ai/compare/1.0.0...1.1
One column per quarter.