{"id":91672,"library":"openai-php-laravel","title":"OpenAI PHP for Laravel","description":"OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API","status":"active","version":"0.20.0","language":"php","source_language":null,"source_url":"https://github.com/openai-php/laravel","tags":["openai","laravel","ai","api-client","gpt"],"install":[{"cmd":"composer require openai-php/laravel","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"OpenAI","correct":"use OpenAI\\Laravel\\Facades\\OpenAI;"}],"quickstart":{"code":"use OpenAI\\Laravel\\Facades\\OpenAI;\n\n$result = OpenAI::chat()->create([\n    'model' => 'gpt-3.5-turbo',\n    'messages' => [\n        ['role' => 'user', 'content' => 'Hello!'],\n    ],\n]);\necho $result->choices[0]->message->content;","lang":"php","description":"Send a chat completion request to OpenAI"},"warnings":[{"fix":"Add OPENAI_API_KEY=your-key to your .env file","message":"Requires an OpenAI API key set in .env as OPENAI_API_KEY","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'ai':23,27 'allow':16 'api':13,24,29 'api-cli':28 'client':14,30 'gpt':31 'interact':19 'laravel':4,8,26 'open':22 'openai':1,5,25 'php':2,6,12 'supercharg':11","created_at":"2026-06-19T09:21:02.104379+00:00","updated_at":"2026-06-19T09:21:02.104379+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/openai-php/laravel","github":"https://github.com/openai-php/laravel","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-client","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}