PHPackages                             siteorigin/openai-api - 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. siteorigin/openai-api

AbandonedArchivedLibrary

siteorigin/openai-api
=====================

A PHP wrapper for the OpenAI API

1.1.2(4y ago)7302↓100%5[1 issues](https://github.com/siteorigin/openai-api/issues)MITPHPPHP ^8.0

Since Jul 7Pushed 2y ago4 watchersCompare

[ Source](https://github.com/siteorigin/openai-api)[ Packagist](https://packagist.org/packages/siteorigin/openai-api)[ Docs](https://github.com/siteorigin/openai-api)[ RSS](/packages/siteorigin-openai-api/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (7)Used By (0)

Archive Notice for the OpenAI PHP Wrapper
=========================================

[](#archive-notice-for-the-openai-php-wrapper)

This repository for the OpenAI PHP Wrapper, developed by SiteOrigin, is now archived. For updated and ongoing PHP integration with OpenAI's API, please refer to the [OpenAI PHP Client](https://github.com/openai-php/client) instead.

Original Repository Details:
----------------------------

[](#original-repository-details)

- **Repository:** [OpenAI PHP Wrapper by SiteOrigin](https://github.com/siteorigin/openai-api)
- **Packagist:** [siteorigin/openai-api](https://packagist.org/packages/siteorigin/openai-api)
- **Functionality:** Facilitated integration with the OpenAI API, offering a PHP-based approach for incorporating GPT-3 into applications.

### Features:

[](#features)

- Provided a comprehensive interface for the OpenAI API in PHP.
- Simplified syntax for common tasks like generating completions.
- Supported full API functionality without constraints.

### Example Code Snippet:

[](#example-code-snippet)

```
use SiteOrigin\OpenAI\Client;
$client = new Client($_ENV['OPENAI_API_KEY']);
// Example usage for generating completions
$completions = $client->completions('davinci')->complete("Sample prompt", [/* parameters */]);
foreach($completions as $c) {
    echo $c->text . "\n";
}
```

### Further Information:

[](#further-information)

For those who previously utilized or are interested in this PHP wrapper, it's recommended to transition to the [new OpenAI PHP Client](https://github.com/openai-php/client) for the latest updates and continued support.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Total

4

Last Release

1522d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c936acc8bcc60aa08303d15f12692319c15ef4c3b783c057abb0570fd1e0f2fb?d=identicon)[gpriday](/maintainers/gpriday)

---

Top Contributors

[![gregpriday](https://avatars.githubusercontent.com/u/1126859?v=4)](https://github.com/gregpriday "gregpriday (88 commits)")

---

Tags

gpt-3openaiphpGPT-3openai

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/siteorigin-openai-api/health.svg)

```
[![Health](https://phpackages.com/badges/siteorigin-openai-api/health.svg)](https://phpackages.com/packages/siteorigin-openai-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[openai-php/symfony

Symfony Bundle for OpenAI

215715.5k3](/packages/openai-php-symfony)[gioni06/gpt3-tokenizer

PHP package for Byte Pair Encoding (BPE) used by GPT-3.

85537.5k8](/packages/gioni06-gpt3-tokenizer)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
