PHPackages                             thojou/openai-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. thojou/openai-php-client

ActiveLibrary[API Development](/categories/api)

thojou/openai-php-client
========================

A user-friendly PHP library designed to facilitate interactions with the OpenAI Rest API.

01.5k↓33.3%PHP

Since Aug 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thojou/openai-php-client)[ Packagist](https://packagist.org/packages/thojou/openai-php-client)[ RSS](/packages/thojou-openai-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OpenAi PHP Client
=================

[](#openai-php-client)

[![Static Badge](https://camo.githubusercontent.com/dd091876be639883d3ec7a5910e3a61fc9f952106be8483268cf06706590b008/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e312d626c7565)](https://camo.githubusercontent.com/dd091876be639883d3ec7a5910e3a61fc9f952106be8483268cf06706590b008/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e312d626c7565)[![CI](https://github.com/thojou/openai-php-client/actions/workflows/ci.yml/badge.svg)](https://github.com/thojou/openai-php-client/actions/workflows/ci.yml)[![Coverage](https://camo.githubusercontent.com/0c967d746eb7f4fe28065a3b94d23faa207cd6f4a968535b20fce0310a87cf89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d677265656e)](https://camo.githubusercontent.com/0c967d746eb7f4fe28065a3b94d23faa207cd6f4a968535b20fce0310a87cf89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d677265656e)[![License](https://camo.githubusercontent.com/dc5ef5fb682ec6a68b9a03cada568e93f5633d4f885d17ccad03d9efc60cc40b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74686f6a6f752f6f70656e61692d7068702d636c69656e74)](./LICENSE)

The **OpenAi PHP Client** is a user-friendly PHP library designed to facilitate interactions with the OpenAI Rest API.

Requirements
------------

[](#requirements)

- PHP version &gt;= 8.1

Installation
------------

[](#installation)

You can effortlessly install the **OpenAi PHP Client** using the popular package manager [composer](https://getcomposer.org/).

```
composer require thojou/openai-php-client
```

Usage
-----

[](#usage)

To begin utilizing the capabilities of the **OpenAi PHP Client**, you'll need an active OpenAI API key. If you don't have one yet, you can obtain it [here](https://platform.openai.com/account/api-keys).

```
