PHPackages                             chrisreedio/laravel-openai-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. chrisreedio/laravel-openai-sdk

ActiveLibrary

chrisreedio/laravel-openai-sdk
==============================

OpenAI integration for Laravel via Saloon

35[2 PRs](https://github.com/chrisreedio/laravel-openai-sdk/pulls)PHP

Since Nov 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chrisreedio/laravel-openai-sdk)[ Packagist](https://packagist.org/packages/chrisreedio/laravel-openai-sdk)[ RSS](/packages/chrisreedio-laravel-openai-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

OpenAI integration for Laravel
==============================

[](#openai-integration-for-laravel)

[![Logo](https://user-images.githubusercontent.com/77644584/283772029-f0a76b76-321c-4ad3-acf9-12b6304de379.png)](https://user-images.githubusercontent.com/77644584/283772029-f0a76b76-321c-4ad3-acf9-12b6304de379.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/62f25bc46fade290329627cc612561a1f47c30f758552301aaecc9f745c19cc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636872697372656564696f2f6c61726176656c2d6f70656e61692d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrisreedio/laravel-openai-sdk)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d3c7b4b22b8cf064d0266ef128f7f5164eb4557cccc3665d575a6995103d70b5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636872697372656564696f2f6c61726176656c2d6f70656e61692d73646b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/chrisreedio/laravel-openai-sdk/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9e77f0d9f2465e2d18f75ab7a7e42ddabcd193c1162cfa0bbf7b0b40efea019a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636872697372656564696f2f6c61726176656c2d6f70656e61692d73646b2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/chrisreedio/laravel-openai-sdk/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8553f1bb76fe379613009b163a14cd05e2599cf28027843bb72b374c4171920b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636872697372656564696f2f6c61726176656c2d6f70656e61692d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chrisreedio/laravel-openai-sdk)

This package provides a SDK for the OpenAI API.

Note

This package is still in development and is not ready for production use.

It is proudly powered by [Saloon](https://docs.saloon.dev/) by [Sam Carré](https://github.com/Sammyjo20)! 🤠

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

[](#installation)

You can install the package via composer:

```
composer require chrisreedio/laravel-openai-sdk
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-openai-sdk-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-openai-sdk-config"
```

This is the contents of the published config file:

```
return [
    'max_per_page' => 100,
    'api_key' => env('OPENAI_API_KEY'),
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-openai-sdk-views"
```

Usage
-----

[](#usage)

```
use ChrisReedIO\OpenAI\Facades\OpenAI;

// Get a list of all the assistants
$assistants = OpenAI::assistants()->list()->collect()->all();

// or via a Lazy Collection
$assistants = OpenAI::assistants()->list()->collect();
$assistants->each(function ($assistant) {
    // Do something with the assistant
});

// Create a thread
$thread = OpenAI::threads()->create();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Chris Reed](https://github.com/chrisreedio)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.6% 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.

### Community

Maintainers

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

---

Top Contributors

[![chrisreedio](https://avatars.githubusercontent.com/u/77644584?v=4)](https://github.com/chrisreedio "chrisreedio (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelopenaiopenai-api

### Embed Badge

![Health badge](/badges/chrisreedio-laravel-openai-sdk/health.svg)

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

PHPackages © 2026

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