# OpenAI GPT-3 Api Client in PHP
> ### ChatGPT API is currently supported, [click here](#chat-as-known-as-chatgpt-api) for the implementation introductions.
*A message from creator,
Thank you for visiting the __@orhanerday/open-ai__ repository! If you find this repository helpful or useful, we encourage you to **star** it
on GitHub. Starring a repository is a way to show your support for the project. It also helps to increase the visibility
of the project and to let the community know that it is valuable. Thanks again for your support and we hope you find the
repository useful!
Orhan*
[![Latest Version on Packagist](https://img.shields.io/packagist/v/orhanerday/open-ai.svg?style=flat-square)](https://packagist.org/packages/orhanerday/open-ai)
[![Total Downloads](https://img.shields.io/packagist/dt/orhanerday/open-ai.svg?style=flat-square)](https://packagist.org/packages/orhanerday/open-ai)
# Featured in
[![Jetbrains Blog](https://user-images.githubusercontent.com/22305274/222431781-86591161-ccd5-4889-bd80-97a0fd0fdf0d.png)](https://blog.jetbrains.com/phpstorm/2022/12/php-annotated-december-2022/#:~:text=orhanerday/open%2Dai%20%E2%80%93%20A%20PHP%20SDK%20for%20accessing%20the%20OpenAI%20GPT%2D3%20API)
[![Laravel News](https://user-images.githubusercontent.com/22305274/222430084-be097d59-e6bc-408d-8adb-7b751d5a05b2.png)](https://laravel-news.com/openai-sdk-for-php)
[![日思录](https://user-images.githubusercontent.com/22305274/222431699-f3a8a146-e27c-4fe3-8c93-1d762559752f.png)](http://tubring.cn/articles/59)
# Comparison With Other Packages
| Project Name | Required PHP Version | Downloads | Description | Type (Official / Community) | Support |
|------------------------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| **orhanerday/open-ai** | **PHP 7.4+** | [![Total Downloads](https://img.shields.io/packagist/dt/orhanerday/open-ai.svg?style=flat-square)](https://packagist.org/packages/orhanerday/open-ai)
| **Most downloaded, forked, contributed, huge community supported, and used PHP SDK for OpenAI GPT-3 and DALL-E. It also supports chatGPT-like streaming.** | Community | Available, ([Community driven Discord Server](https://discord.gg/xpGUD528XJ) or personal mail [orhan@duck.com](mailto:orhan@duck.com)) |
| openai-php/client | PHP 8.1+ |
| OpenAI PHP API client. | Community | - |
## About this package
Fully open-source and secure community-maintained, PHP SDK for accessing the OpenAI GPT-3 API.
> #### For more information, you can read laravel news [blog post](https://laravel-news.com/openai-sdk-for-php).
> #### Free support is available. [Join our discord server](#join-our-discord-server)
> #### To get started with this package, you'll first want to be familiar with the [OpenAI API documentation](https://beta.openai.com/docs/introduction) and [examples](https://beta.openai.com/examples). Also you can get help from our discord channel that called [#api-support](https://discord.gg/R9CpVUdqQR)
## News
- orhanerday/open-ai added to community libraries php [section](https://beta.openai.com/docs/libraries/php).
- orhanerday/open-ai featured
on [PHPStorm blog post](https://blog.jetbrains.com/phpstorm/2022/12/php-annotated-december-2022/#:~:text=orhanerday/open%2Dai%20%E2%80%93%20A%20PHP%20SDK%20for%20accessing%20the%20OpenAI%20GPT%2D3%20API),
thanks JetBrains!
> Requires PHP 7.4+
## Join our discord server
![Discord Banner 2](https://discordapp.com/api/guilds/1047074572488417330/widget.png?style=banner2)
[Click here to join the Discord server](https://discord.gg/xpGUD528XJ)
## Support this project
As you may know, OpenAI PHP is an open-source project wrapping tool for OpenAI. We rely on the support of our community
to continue developing and maintaining the project, and one way that you can help is by making a donation.
Donations allow us to cover expenses such as hosting costs(for testing), development tools, and other resources that are
necessary to keep the project running smoothly. Every contribution, no matter how small, helps us to continue improving
OpenAI PHP for everyone.
If you have benefited from using OpenAI PHP and would like to support its continued development, we would greatly
appreciate a donation of any amount. You can make a donation through;
* [Buy me a coffee](https://www.buymeacoffee.com/orhane)
* [Patreon](https://patreon.com/orhann)
* [Click here for the Coinbase QR](#btc) **Bitcoin** > 34w2DftWGkDqDbYMixkmdWWMLmaP9uTRz7
* [Click here for the Coinbase QR](#doge) **Dogecoin** > DHiqcZox9M8kYDn7BkesnN6Z2kJ7dYG9Lc
* [Click here for the Coinbase QR](#eth) **Ethereum** > 0x135E2D5d7AC40c6850f844BA589D68e91a268Ceb
Thank you for considering a donation to Orhanerday/OpenAI PHP SDK. Your support is greatly appreciated and helps to
ensure that the project can continue to grow and improve.
*Sincerely,*
**Orhan Erday** / Creator.
# Endpoint Support
- Chat
- [x] [ChatGPT API](#chat-as-known-as-chatgpt-api)
- Models
- [x] [List models](https://beta.openai.com/docs/api-reference/models/list)
- [x] [Retrieve model](https://beta.openai.com/docs/api-reference/models/retrieve)
- Completions
- [x] [Create completion](https://beta.openai.com/docs/api-reference/completions/create)
- Edits
- [x] [Create edits](https://beta.openai.com/docs/api-reference/edits/create)
- Images
- [x] [Create image](https://beta.openai.com/docs/api-reference/images/create)
- [x] [Create image edit](https://beta.openai.com/docs/api-reference/images/create-edit)
- [x] [Create image variation](https://beta.openai.com/docs/api-reference/images/create-variation)
- Embeddings
- [x] [Create embeddings](https://beta.openai.com/docs/api-reference/embeddings/create)
- Audio
- [x] [Create transcription](https://platform.openai.com/docs/api-reference/audio/create)
- [x] [Create translation](https://platform.openai.com/docs/api-reference/audio/create)
- Files
- [x] [List files](https://beta.openai.com/docs/api-reference/files/list)
- [x] [Upload file](https://beta.openai.com/docs/api-reference/files/upload)
- [x] [Delete file](https://beta.openai.com/docs/api-reference/files/delete)
- [x] [Retrieve file](https://beta.openai.com/docs/api-reference/files/retrieve)
- [x] [Retrieve file content](https://beta.openai.com/docs/api-reference/files/retrieve-content)
- Fine-tunes
- [x] [Create fine