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

ActiveLibrary[API Development](/categories/api)

omeratagunn/openai
==================

Composer package for openAI cli

v1(5y ago)031MITPHP

Since Oct 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tyraelll/OpenAI-php)[ Packagist](https://packagist.org/packages/omeratagunn/openai)[ Docs](https://github.com/tyraelll/openApi-php)[ RSS](/packages/omeratagunn-openai/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

\#OpenAI-php

PHP client for

- Guzzle client. Check examples to parse response as you wish.

Simply call composer

`composer require omeratagunn/openai`

\#Example Usage

```
$test = new OpenAI('your-key');

// default davinci, to see other engines please visit openAI documentation//
$test->setEngineId('davinci');

try {
    $a = $test->postCompletions([
        'prompt' => "I wish i had a flying fish",
        'max_tokens' => 5,
        'temperature' => 1,
        'top_p' => 1,
        'n' => 1,
        'stream' => false,
        'logprobs' => null,
        'stop' => "\n"
    ]);

    $response = $a->getBody()->getContents();

} catch (\GuzzleHttp\Exception\GuzzleException $e) {
    $e->getMessage();
}

try {
    $b = $test->search([
        'documents' => [
            'white house',
            'hospital',
            'school'
        ],
        'query' => "the president"
    ]);

    $response = $b->getBody()->getContents();

} catch (\GuzzleHttp\Exception\GuzzleException $e) {
    $e->getMessage();
}

```

\#License Published under the MIT License

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2021d ago

### Community

Maintainers

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

---

Top Contributors

[![omeratagunn](https://avatars.githubusercontent.com/u/29014425?v=4)](https://github.com/omeratagunn "omeratagunn (3 commits)")

---

Tags

openapiopenapicli

### Embed Badge

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

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

###  Alternatives

[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)[minchao/shopee-php

Shopee Partner API PHP SDK

14536.5k](/packages/minchao-shopee-php)[kscsdk/ksyun_sdk

ksyun openapi sdk

1627.5k](/packages/kscsdk-ksyun-sdk)

PHPackages © 2026

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