openai-php/client
OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API
v0.20.1
31M downloads/mo
#458 most downloaded on Packagist
openai-php/client
What this package is like to depend on
Last release 1 months ago
20 Jul 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 58 of 59 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
63 releases · first in 2022
9 releases in the last 12 months
see the full history below
Release timeline
62 releases · Oct 2022 to Jul 2026Releases
latest 60 of 63-
v0.20.120 Jul 2026Release notes
Open source →What's Changed
- build(deps): bump shivammathur/setup-php from 2.37.1 to 2.37.2 by @dependabot[bot] in #782
- docs: fix typo in README.md (reponse -> response) by @lingxiaoyiyu-hub in #783
- build(deps): bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #784
- build(deps): bump actions/cache from 5.0.5 to 6.1.0 by @dependabot[bot] in #785
- fix(OpenAI): Support streaming 'compaction' output by @e4se in #787
- fix(OpenAI): default missing optional keys to null in from() by @lazerg in #786
- fix(OpenAI): Preserve function call namespaces by @e4se in #788
- fix(OpenAI): Support 'tool_search' output by @e4se in #789
- release: v0.20.1 by @iBotPeaches in #791
New Contributors
- @lingxiaoyiyu-hub made their first contribution in #783
- @lazerg made their first contribution in #786
Full Changelog: v0.20.0...v0.20.1
-
v0.20.013 Jun 2026Release notes
Open source →What's Changed
- fix missing sequence numbers by @madskildegaard in #764
- fix: guard missing vector store response description for Azure OpenAI compatibility by @jesse-bos in #765
- add support for extra_content in chat response tool calls returned by Gemini models by @leonardfischer in #768
- fix: Handle new OpenAI response keep_alive type by @Fox-Islam in #770
- build(deps): bump shivammathur/setup-php from 2.37.0 to 2.37.1 by @dependabot[bot] in #769
- feat(OpenAI): Add 'tool_search' functionality. by @iBotPeaches in #772
- build(deps): bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #776
- fix(OpenAI): add support for response 'compaction' by @iBotPeaches in #778
- release: v0.20.0 by @iBotPeaches in #779
New Contributors
- @jesse-bos made their first contribution in #765
- @Fox-Islam made their first contribution in #770
Full Changelog: v0.19.2...v0.20.0
-
v0.19.219 Apr 2026Release notes
Open source →What's Changed
- fix: reasoning streaming by @L3o-pold in #751
- Add
phaseproperty toOutputMessageby @Copilot in #754 - fix(OpenAI): React properly to server and 'high demand' errors (#730) by @leonardfischer in #757
- fix VectorStoreResponseFileCounts attribute order by @madskildegaard in #756
- Ratelimit event by @iBotPeaches in #761
New Contributors
- @Copilot made their first contribution in #754
- @leonardfischer made their first contribution in #757
Full Changelog: v0.19.1...v0.19.2
-
v0.19.117 Mar 2026Release notes
Open source →What's Changed
- Fix syntax error in README.md example code by @simonschaufi in #741
- fix: default tool call type to function for Mistral compatibility by @ivanmestre in #744
- Add missing fields to
OutputImageGenerationToolCallby @Androbin in #742 - feat files missing expiration by @madskildegaard in #746
- fix: vector store description by @madskildegaard in #747
- fix: vector store file contract missing updateAttributes function by @madskildegaard in #748
- chore: format against modern pint defaults by @iBotPeaches in #750
- release: v0.19.1 by @iBotPeaches in #749
New Contributors
- @simonschaufi made their first contribution in #741
- @ivanmestre made their first contribution in #744
- @Androbin made their first contribution in #742
Full Changelog: v0.19.0...v0.19.1
-
v0.19.010 Feb 2026Release notes
Open source →What's Changed
- feat: Responses streaming types by @madskildegaard in #711
- Add 'response.queued' event to CreateStreamedResponse by @boboldehampsink in #712
- Response Retrieve streamed by @boboldehampsink in #713
- build(core): test on php 8.5 by @iBotPeaches in #714
- build(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #716
- fix: List items for a conversation.
file_idis null andfile_datais not present in the API response by @romainnorberg in #715 - Add image streaming support by @boboldehampsink in #720
- Feat: Add Webhook Signature Verification by @Radiergummi in #722
- build(deps): bump actions/cache from 4 to 5 by @dependabot[bot] in #724
- Responses\CreateResponseType optional values are not handled properly by @bbrala in #728
- fix(OpenAI): add support for missing
urlon web search output by @iBotPeaches in #733 - fix(OpenAI): Add support for empty 'keepalive' stream event. by @iBotPeaches in #734
- fix(OpenAI): don't bail out early on text/plain - only if JSON parsing errors occurred. by @iBotPeaches in #736
- feat: add reasoning_content field to CreateResponseMessage by @Kemel91 in #737
- release: v0.19.0 by @iBotPeaches in #740
New Contributors
- @madskildegaard made their first contribution in #711
- @boboldehampsink made their first contribution in #712
- @romainnorberg made their first contribution in #715
- @Radiergummi made their first contribution in #722
- @bbrala made their first contribution in #728
- @Kemel91 made their first contribution in #737
Full Changelog: v0.18.0...v0.19.0
-
v0.18.031 Oct 2025Release notes
Open source →What's Changed
- Feature/nano banana by @nmdimas in #685
- fix: Missing properties on container file annotation by @knash94 in #703
- feat: Add containers interface to client by @knash94 in #704
- fix: Allow bytes to be nullable on ContainerFileResponse by @knash94 in #705
- fix(OpenAI): Handle diarized json response in TranscriptionResponseSegment by @olivier-drieux in #706
- feat(OpenAI): add support for actions on web_search_call by @iBotPeaches in #707
- Feat: Add usage to streamed completions by @math625f in #708
- [Release] v0.18.0 by @iBotPeaches in #710
New Contributors
- @nmdimas made their first contribution in #685
- @olivier-drieux made their first contribution in #706
- @math625f made their first contribution in #708
Full Changelog: v0.17.1...v0.18.0
-
v0.17.109 Oct 2025Release notes
Open source →What's Changed
- Add
filenameproperty to OutputMessageContentOutputTextAnnotationsF… by @qwertyquest in #696 - chore(OpenAI): unify typing on file citation object by @iBotPeaches in #698
- fix(OpenAI): Apply OpenAI-Beta to all Assistant type resources by @iBotPeaches in #701
- release: v0.17.1 by @iBotPeaches in #702
New Contributors
- @qwertyquest made their first contribution in #696
Full Changelog: v0.17.0...v0.17.1
- Add
-
v0.17.002 Oct 2025Release notes
Open source →What's Changed
- chore(OpenAI): deprecate Assistants API officially by @iBotPeaches in #679
- Adds @iBotPeaches to the suggested sponsors in the README by @ianhawes in #677
- fix(OpenAI): have a robust ErrorException to handle object/string error responses. by @iBotPeaches in #682
- feat(OpenAI): add Conversation API by @iBotPeaches in #658
- fix(Doubao): increase nullability on image usage types by @iBotPeaches in #684
- fix(OpenAI) - add missing pagination fields to files.list by @iBotPeaches in #687
- Fix undefined array key errors for xAI Responses API by @dnnp2011 in #689
- fix(OpenAI): prevent registration of headers on all requests by @iBotPeaches in #688
- Update README.md by @carvemerson in #691
- release: v0.17.0 by @iBotPeaches in #694
New Contributors
- @ianhawes made their first contribution in #677
- @dnnp2011 made their first contribution in #689
- @carvemerson made their first contribution in #691
Full Changelog: v0.16.1...v0.17.0
-
v0.16.104 Sep 2025Release notes
Open source →What's Changed
- Handle optional attributes in CreateResponse by @louisbels in #662
- Add
sequence_numbersupport toOutputTextDelta. by @e4se in #664 - fix(OpenAI): support mcp error objects in response api by @iBotPeaches in #661
- feat: hosted-tool-choice-web-search by @ymktmk in #665
- fix(OpenAI): Add missing properties to ListInputItems call by @iBotPeaches in #668
- fix(OpenAI): handle null require_approval in Response API by @iBotPeaches in #669
- fix(OpenAI): support nested file search properties by @iBotPeaches in #670
- refactor(meta): unify response types into Actions by @iBotPeaches in #671
- Add support for reasoning text streaming events by @louisbels in #673
- Fix fixture typos. Remove extra spaces from json keys in ThreadRunStreamResponseFixture.txt by @ruslan-polutsygan in #674
- release: v0.16.1 by @iBotPeaches in #676
New Contributors
- @louisbels made their first contribution in #662
- @e4se made their first contribution in #664
- @ymktmk made their first contribution in #665
- @ruslan-polutsygan made their first contribution in #674
Full Changelog: v0.16.0...v0.16.1
-
v0.16.026 Aug 2025Release notes
Open source →What's Changed
- feat(OpenAI): GPT5 support by @iBotPeaches in #639
- fix(OpenAI): add support for reasoning.summary by @iBotPeaches in #642
- #581: Add
OverrideStrategyenum for the fakeable trait to support merge/replace by @droath in #646 - chore(meta): rework exception handling by @iBotPeaches in #643
- feat(OpenAI): Add Container File API by @iBotPeaches in #648
- fix(meta): use raw response on ErrorException by @iBotPeaches in #649
- chore(meta): use pest throws instead of internal phpunit methods by @iBotPeaches in #650
- fix(OpenAI): support fine tuning with failed tuning job by @iBotPeaches in #651
- fix(meta): handle 429 (rate limit) gracefully by @iBotPeaches in #652
- fix(OpenAI): augment support for Response API - MCP Connectors by @iBotPeaches in #654
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #657
- release: v0.16.0 by @iBotPeaches in #659
New Contributors
- @droath made their first contribution in #646
- @dependabot[bot] made their first contribution in #657
Full Changelog: v0.15.0...v0.16.0
-
v0.15.004 Aug 2025Release notes
Open source →Added
- Add
updateAttributesmethod toVectorStoresFiles(#626) - Add support for chat completion audio modality (#629)
- Add
ContainersAPI (#636) - Add
modelfield toCreateResponsefor embeddings (#634)
Fixed
- Add
-
v0.14.024 Jun 2025Release notes
Open source →Added
- Add helper method
output_textto Responses API (#579) - Add support for response cancel in Responses API (#588)
- Add support for Image Generation Tool to Responses API (#594)
- Add streaming for Image Generation in Responses API (#602)
- Add support for Code Interpreter to Responses API (#610)
- Add support for Remote MCP Tool in Responses API (#601)
- Add realtime ephemeral tokens (#591)
- Add streaming support for Audio transcriptions (#603)
- Add realtime key documentation (#597)
Fixed
- Add missing
indextoCreateStreamedResponseToolCall(#562) - Make
$parametersoptional in threadcreate()method (#577) - Support Azure
model.listendpoint (#599) - Add
reasoning_effortsupport to Assistants (#606) - Use proper parameter order in
Responseconstructor (#615) - Support reused prompts/instructions in Responses API (#616)
Changed
- Use proper header notation for Responses API docs (#596)
- Collapse legacy/deprecated sections by default in docs (#609)
Deprecated
- Add helper method
-
v0.13.014 May 2025Release notes
Open source →Added
- Add support for Responses API (#541)
Fixed
- Add Throwable type support to ClientFake responses (#576)
-
v0.12.004 May 2025 -
v0.11.0no dateRelease notes
Open source →Added
- Add logprobs to Chat Response (#533)
- Add ResponseHasMetaInformationContract contract to ThreadRunStepResponse (#523)
- Add support for 'attributes' on vector store files (#551)
- Add OpenAI compatibility support for Google Gemini (#502)
- Add compatibility for Aliyun LLM APIs (#530)
- Add ability to pass arguments to files list request (#557)
- Add search vector store functionality (#559)
- Add Image Response usage (#571)
- Add category applied input types to moderation response (#572)
- Add support for annotations in Chat response (Web Search) (#564)
- Add test coverage for assistants streaming and related functionality (#444)
Changed
- Update GitHub Action deprecations & opt into Dependabot (#544)
- Draw attention away from deprecated completions endpoints in docs (#548)
Fixed
- Fix type definition for responses in ClientFake::addResponses method (#382)
- Fix Content retrieval in HttpTransport with custom HttpClient (#343)
- Fix correct completion endpoint when logprobs missing (#550)
- Fix chat completion choices to allow responses without logprobs field (#554)
- Fix support for streaming of non-OpenAI models that return "ping" (#556)
- Fix OpenRouter token usage response (#560)
- Fix Gemini list models (#567)
-
v0.10.312 Nov 2024Release notes
Open source →Added
- Add http status to ErrorException (#487)
- Add
cached_usageto CreateResponseUsage for Chat (#494) - Add moderation categories (Illicit*) (#495)
Fixed
-
v0.10.217 Oct 2024Release notes
Open source →Added
- Add
thread.run.incompleteto ThreadRunStreamResponse (#421) - Add
withProjectto configure the project for the client (#377) - Add fake
b64_jsonto support mocking (#462)
Fixed
- Add
-
v0.10.106 Jun 2024Release notes
Open source →Added
- Add support for Assistants API v2 and Vector Stores endpoints (#420)
Docs
- Add vector store endpoints documentation (#420)
-
v0.10.0-beta.127 May 2024 pre-releaseRelease notes
Open source →Added
- Add support for Assistants API v2 and Vector Stores endpoint (#405)
-
v0.9.227 May 2024Release notes
Open source →Added
- Support for usage stream option on chat endpoint (#398)
Fixed
- Missing output parameter on streamed code interpreter output (#406)
-
v0.9.124 May 2024 -
v0.9.021 May 2024 -
v0.8.515 Apr 2024 -
v0.8.407 Feb 2024 -
v0.8.302 Feb 2024 -
v0.8.226 Jan 2024 -
v0.8.122 Dec 2023Release notes
Open source →Added
- Add support for Assistants and Threads endpoint (#271)
- Add stream support for Text To Speech (#235)
- Add test resources for Assistants and Threads (#279)
Changed
- Remove thread messages delete endpoint (#309)
Fixed
- Handle x-request-id in meta information (#283)
- Handle meta information from azure headers (#307)
- Add missing default system_fingerprint to chat create response fixture (#308)
- Convert headers to lower case before creation meta information (#306)
Docs
-
v0.8.023 Nov 2023 -
v0.8.0-beta.323 Nov 2023 pre-release -
v0.8.0-beta.214 Nov 2023 pre-release -
v0.8.0-beta.113 Nov 2023 pre-release -
v0.7.1014 Nov 2023Release notes
Open source →Added
- Add RetrieveJobResponseError and batch_size, learning_rate_multiplier parameters on RetrieveJobResponseHyperparameters for fine-tuning endpoint (#255)
-
v0.7.914 Nov 2023Release notes
Open source →Added
- Add revised_prompt property to CreateResponseData on the image create endpoint (#257)
Docs
- Fix model in one of the examples
-
v0.7.807 Nov 2023Release notes
Open source →Added
- Add support for GTP-4 vision on the chat completion endpoint (#241)
-
v0.7.707 Nov 2023 -
v0.7.606 Nov 2023 -
v0.7.506 Nov 2023Release notes
Open source →Changed
- Update Models endpoint response object to the latest API changes (#235)
Docs
- Update FineTuning job id names (#230)
- Use Chat resource as the primary example
-
v0.7.421 Oct 2023Release notes
Open source →Fixed
- nEpochs on RetrieveJobResponseHyperparameters may be string
- processingMs ond MetaInformationOpenAI may be null (#218)
-
v0.7.308 Sep 2023Release notes
Open source →Added
- Add "has_more" to fine-tuning jobs and events list responses (#206)
Changed
- Add parameters to the fine-tuning jobs list request to filter the results (#206)
Fixed
- error_code may be int
-
v0.7.231 Aug 2023 -
v0.7.129 Aug 2023 -
v0.7.029 Aug 2023Release notes
Open source →Added
- Add support for the fine-tuning API (#199)
- Provide access to header / meta information for all responses (#195)
Changed
- Mark
FineTunesresource as deprecated - Mark
Editsresource as deprecated - Add missing moderation enums (#178)
Fixed
-
v0.6.418 Jul 2023Nothing published for this version
-
v0.6.307 Jul 2023Release notes
Open source →Fixed
- Breaking change on OpenAI API regarding "transient" field in Audio (#160)
-
v0.6.223 Jun 2023Release notes
Open source → -
v0.6.115 Jun 2023 -
v0.6.014 Jun 2023Release notes
Open source →Added
- Add support for function calling in the Chat Completions API (#144)
-
v0.5.307 Jun 2023 -
v0.5.227 May 2023 -
v0.5.124 May 2023 -
v0.5.024 May 2023Release notes
Open source →Added
- Support for HTTP base uri (#106)
Changed
- unify exception handling between HTTP client implementations (#113)
Fixed
- fix toArray() on
CreateStreamedResponseDeltato match the original API response (#108)
Docs
- explain usage for "OpenAI on Azure" (#109)
-
v0.4.212 Apr 2023Release notes
Open source →Added
- Testing support (#71)
Changed
- Trim ApiKey before sending it to the API (#101)
Fixed
- Nullable fields on error response (#102)
-
v0.4.124 Mar 2023 -
v0.4.017 Mar 2023Release notes
Open source →Changed
- Removed dependency for
guzzlehttp/guzzleand use PSR-18 client discovery instead (#75) - Add Client factory which allows for a custom HTTP client
- Client factory further accepts custom HTTP headers, query parameters and API URI
- Removed dependency for
-
v0.3.508 Mar 2023Release notes
Open source →Fixed
status_detailscan be a string in file responses. Affects Files and FineTunes resources (#68)
-
v0.3.403 Mar 2023 -
v0.3.302 Mar 2023 -
v0.3.228 Feb 2023Release notes
Open source → -
v0.3.107 Feb 2023 -
v0.3.003 Jan 2023Release notes
Open source →Changed
OpenAI::client()first argument changed fromapiTokentoapiKey(#25)
Fixed
- Getting contents from Guzzle's response causing issues with middleware (#33)