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. [API Development](/categories/api)
4. /
5. siteorigin/openai-api

AbandonedArchivedLibrary[API Development](/categories/api)

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

A PHP wrapper for the OpenAI API

1.1.2(4y ago)73025[1 issues](https://github.com/siteorigin/openai-api/issues)MITPHPPHP ^8.0

Since Jul 7Pushed 2y ago2 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 2w 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

30

—

LowBetter than 62% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

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

1567d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13748?v=4)[gpriday](/maintainers/gpriday)[@gpriday](https://github.com/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.7k8.8M83](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

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

1.7k371.6k6](/packages/theodo-group-llphant)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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