openai-php/laravel
Community-maintained OpenAI PHP integration for Laravel. Install via Composer and artisan, configure API key in .env, then use the OpenAI facade to call OpenAI endpoints (e.g., Responses API) from your Laravel app.
conversations facade.responses facade.fake() to avoid hitting rate limits during QA.Adopt if:
OpenAI::responses()->create()).Look Elsewhere if:
openai-php/client instead).realtime)."This package lets us integrate OpenAI’s cutting-edge models (like GPT-5) into our Laravel apps without building a custom API client—saving 3–6 months of dev time. It’s battle-tested (3.7K stars), MIT-licensed, and includes built-in testing tools to cut API costs during development. For example, we could launch an AI-powered support chatbot in Q3 by leveraging its conversations facade, while the fake() method lets QA test responses locally. The underlying openai-php/client is actively maintained, so we avoid vendor risk."
*"This is a drop-in Laravel wrapper for OpenAI’s PHP SDK, offering:
responses, fineTuning, realtime, etc.) with Laravel’s dependency injection..env (API keys, timeouts, base URLs) and type-safe responses.OpenAI::fake()).curl call to OpenAI’s API with:$response = OpenAI::responses()->create(['model' => 'gpt-5', 'input' => 'Summarize this...']);
echo $response->outputText;
No more JSON parsing or auth headaches."*
Risk Mitigation:
openai-php/client if Laravel-specific features aren’t needed.How can I help you explore Laravel packages today?