PHPackages                             illegal/laravel-ai - 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. [API Development](/categories/api)
4. /
5. illegal/laravel-ai

ActiveLibrary[API Development](/categories/api)

illegal/laravel-ai
==================

A laravel plugin to interact with AI providers

v0.1.4.1(3y ago)7322MITPHPPHP ^8.1

Since Mar 22Pushed 2y ago3 watchersCompare

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

READMEChangelog (6)Dependencies (4)Versions (8)Used By (0)

Laravel AI
==========

[](#laravel-ai)

> **WARNING:** This package is currently under heavy development and is not yet suitable for production use.

The Laravel AI package provides an interface for connecting your Laravel application with AI services, particularly with OpenAI. With this package, you can easily:

- Send requests to OpenAI and receive responses
- Customize the parameters of your requests
- Keep track of all requests and responses in your database
- Keep track of the costs of your requests

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

[](#installation)

You can install the package via composer:

```
composer require illegal\laravel-ai
```

After installation, publish the configuration file:

```
php artisan vendor:publish --provider="[Package Name]ServiceProvider"
```

Configuration
-------------

[](#configuration)

In the .env file, set your OpenAI API key:

```
AI_OPENAI_API_KEY=YOUR_API_KEY
```

Command line tools
------------------

[](#command-line-tools)

This package offers a variety of command line tools that simplify interaction with AI services. Each tool prompts you to specify a provider and a model.

The tools include:

### Chat

[](#chat)

```
php artisan ai:chat
```

This command enables you to initiate a chat with an AI. Once the command is executed, you can begin your conversation.

### Completion

[](#completion)

```
php artisan ai:complete
```

This command allows you to request the AI to complete your text. Once the command is executed, you can provide your prompt and the AI will generate a response.

### Image generate

[](#image-generate)

```
php artisan ai:image:generate
```

This command allows you to request the AI to generate an image. Once the command is executed, you can provide your prompt and the AI will generate an image.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~8 days

Total

6

Last Release

1107d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d45226dc1c994059bfb274dc3a8a69a45154cdab95c17b18e7fdb804c31202c?d=identicon)[illegalvuppi](/maintainers/illegalvuppi)

---

Top Contributors

[![nahime0](https://avatars.githubusercontent.com/u/436702?v=4)](https://github.com/nahime0 "nahime0 (96 commits)")

---

Tags

aiartificial-intelligencechatgptgpt-3gpt-4laravelmachine-learningopenailaravelaiopenaimachine learningartificial intelligencegpt3gpt4

### Embed Badge

![Health badge](/badges/illegal-laravel-ai/health.svg)

```
[![Health](https://phpackages.com/badges/illegal-laravel-ai/health.svg)](https://phpackages.com/packages/illegal-laravel-ai)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[vectorifyai/vectorify-laravel

Vectorify package for Laravel. The fastest way to ask AI about your data.

206.1k](/packages/vectorifyai-vectorify-laravel)

PHPackages © 2026

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