openai-php/laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 50 minutes ago
Added to GitGenius on September 18th, 2026
Created on December 26th, 2022
Open Issues & Pull Requests: 13 (+0)
GitHub issues: Enabled
Number of forks: 268
Total Stargazers: 3,752 (+0)
Total Subscribers: 46 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 3.4 days
Mean response time: 62.1 days
90th percentile: 249.6 days
Tracked items: 36

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 556 days
Stale 30+ days: 4
Stale 90+ days: 4

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

OpenAI PHP for Laravel is a Laravel integration package that allows you to interact with the OpenAI API from within Laravel applications.

The package solves the problem of integrating OpenAI API calls into Laravel projects by providing a Laravel facade and configuration system. It wraps the framework-agnostic OpenAI PHP client and adds Laravel-specific conveniences like environment variable configuration, a publishable config file, and facade-based access to API methods.

Developers building Laravel applications that need to call OpenAI endpoints should choose this package. It suits any Laravel project requiring chat completions, embeddings, or other OpenAI capabilities. The package requires PHP 8.2 or higher. For framework-agnostic PHP projects not using Laravel, the underlying openai-php/client library is available as an alternative. The tool includes built-in testing support through a fake() method on the facade, allowing you to mock API responses and verify that expected requests were sent during testing.

The project maintains active test coverage with continuous integration checks. Documentation is kept minimal in the repository itself, with usage examples and detailed testing patterns delegated to the underlying client library repository. Configuration is straightforward and environment-variable driven, with an install command that scaffolds the necessary config file and .env entries.