Analysis updated 2026-07-03
Add a ChatGPT-powered chatbot to a Laravel web app by sending user messages to OpenAI and streaming the response back.
Generate AI-written text or summaries inside a Laravel controller without managing HTTP requests manually.
Write automated tests for AI-powered features by using the package's fake response mode to avoid real API calls.
Quickly prototype an AI feature in an existing Laravel project using environment-variable-based API key configuration.
| openai-php/laravel | kriswallsmith/assetic | crinsane/laravelshoppingcart | |
|---|---|---|---|
| Stars | 3,720 | 3,718 | 3,704 |
| Language | PHP | PHP | PHP |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires PHP 8.2 or higher and an OpenAI API key from your account dashboard.
This package connects Laravel applications to the OpenAI API. Laravel is a widely used PHP framework for building websites and web applications, and OpenAI provides the AI models behind tools like ChatGPT. This package acts as the bridge between the two, making it straightforward to send text to OpenAI models and receive responses back, all within a Laravel project. Installing the package takes a few commands. You add it to your project using Composer, which is a standard tool for managing PHP packages, then run a setup command that creates a configuration file and adds two placeholder lines to your project's settings file: one for your OpenAI API key and one for your organization ID. Both come from your OpenAI account dashboard. Once that is done, you call OpenAI's services through a clean interface that Laravel developers will recognize. The README shows a brief example of sending a message to a model and printing the response. Configuration is handled through environment variables, so API keys stay out of the code itself. You can also adjust settings like the base URL for the API and how long the application should wait before giving up on a request. For testing, the package includes a way to simulate OpenAI responses without actually sending requests to the real API. This is useful during development and automated testing, where you do not want to spend API credits or depend on a live network connection. You can define what fake responses the application should receive, then verify that the right requests were made. The package is community-maintained and released under the MIT license. It requires PHP 8.2 or higher. For developers who want to use the same OpenAI client outside of Laravel, a separate framework-agnostic version of the client is also available.
A Laravel package that connects PHP web apps to the OpenAI API, making it easy to send messages to AI models and receive responses with minimal setup.
Mainly PHP. The stack also includes PHP, Laravel, Composer.
MIT license: free to use in personal and commercial projects as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.