PHPackages                             maryushenina/ai-client-sdk - 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. maryushenina/ai-client-sdk

ActiveLibrary[API Development](/categories/api)

maryushenina/ai-client-sdk
==========================

Lightweight SDK for using OpenAI Chat Completion API in PHP projects.

v0.1.0(1y ago)022MITPHPPHP &gt;=8.1CI passing

Since Jul 3Pushed 9mo agoCompare

[ Source](https://github.com/MaryUshenina/ai-client-sdk)[ Packagist](https://packagist.org/packages/maryushenina/ai-client-sdk)[ RSS](/packages/maryushenina-ai-client-sdk/feed)WikiDiscussions main Synced today

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

AI Client SDK for PHP
=====================

[](#ai-client-sdk-for-php)

Lightweight SDK for interacting with the OpenAI Chat Completion API using PHP.

[![Tests](https://github.com/MaryUshenina/ai-client-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/MaryUshenina/ai-client-sdk/actions)[![Packagist](https://camo.githubusercontent.com/3364ed8df9021949ca516ba0752f0907b1e2070ee5910163520a0775b33655e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617279757368656e696e612f61692d636c69656e742d73646b2e737667)](https://packagist.org/packages/maryushenina/ai-client-sdk)[![License](https://camo.githubusercontent.com/49438ba4f2c64ec924d197409afaf3a7da6ebb8e6b11439836d402ede8416346/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d617279557368656e696e612f61692d636c69656e742d73646b)](LICENSE)

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

[](#installation)

```
composer require maryushenina/ai-client-sdk
```

Usage
-----

[](#usage)

```
use GuzzleHttp\Client;
use MaryUshenina\AiClientSdk\OpenAIClient;

$client = new OpenAIClient(new Client(), 'your-api-key');

$response = $client->complete([
    ['role' => 'system', 'content' => 'You are a helpful assistant.'],
    ['role' => 'user', 'content' => 'What is PHP?']
]);

echo $response;
```

Testing
-------

[](#testing)

```
./vendor/bin/phpunit
```

### Install dependencies

[](#install-dependencies)

make install

### Rebuild environment (clean + install)

[](#rebuild-environment-clean--install)

make rebuild

### Run tests inside Docker (optional)

[](#run-tests-inside-docker-optional)

make docker-test

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c8e5ca091a93e7a186526d360c39a58446e64a1b77bd5f6cba36a0533477da9?d=identicon)[MaryUshenina](/maintainers/MaryUshenina)

---

Top Contributors

[![MaryUshenina](https://avatars.githubusercontent.com/u/1484657?v=4)](https://github.com/MaryUshenina "MaryUshenina (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maryushenina-ai-client-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/maryushenina-ai-client-sdk/health.svg)](https://phpackages.com/packages/maryushenina-ai-client-sdk)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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