PHPackages                             sfolador/ai-avatar-suggest - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sfolador/ai-avatar-suggest

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sfolador/ai-avatar-suggest
==========================

Create avatar for your users with openai

1.2(3y ago)38[2 PRs](https://github.com/sfolador/ai-avatar-suggest/pulls)MITPHPPHP ^8.1

Since Jan 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sfolador/ai-avatar-suggest)[ Packagist](https://packagist.org/packages/sfolador/ai-avatar-suggest)[ Docs](https://github.com/sfolador/ai-avatar-suggest)[ RSS](/packages/sfolador-ai-avatar-suggest/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (13)Versions (6)Used By (0)

Create avatar for your users with openai
========================================

[](#create-avatar-for-your-users-with-openai)

[![Latest Version on Packagist](https://camo.githubusercontent.com/657358cef5e7db175ad7a64b1e7479424cb376d7234e6dd1e51edf13685b0370/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73666f6c61646f722f61692d6176617461722d737567676573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfolador/ai-avatar-suggest)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d78d09393291d74fd5a6de4a01e52e0e700e4681969816475fdeff279525514a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73666f6c61646f722f61692d6176617461722d737567676573742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/sfolador/ai-avatar-suggest/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/508beb311fed7d5e0f80421689846218d1fa8797663e45884799ec46ad5d248e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73666f6c61646f722f61692d6176617461722d737567676573742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/sfolador/ai-avatar-suggest/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/62face93adfc7746ca21ffada2c16b955a3960880c48e612e756f1e92173aaee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73666f6c61646f722f61692d6176617461722d737567676573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfolador/ai-avatar-suggest)

Use this library to generate avatars for your users by letting them insert a short description about themselves.

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

[](#installation)

You can install the package via composer:

```
composer require sfolador/ai-avatar-suggest
```

You can publish the config file with:

```
php artisan vendor:publish --tag="ai-avatar-suggest-config"
```

This is the contents of the published config file:

```
return [
    'openai_key' => env('OPENAI_KEY'),
    'default_size' => '256x256',
    'default_route' => 'ai-avatar-suggest',
    'use_cache' => true,
    'throttle' => [
        'enabled' => false,
        'max_attempts' => 60,
        'prefix' => 'ai-avatar-suggest',
    ],
];
```

*Remember to set your OpenAI key in your .env file.*

If the `use_cache` option is set to `true`, the package will use the default cache driver to prevent unnecessary calls to the OpenAI API. You can change the cache driver in your `config/cache.php` file.

Usage
-----

[](#usage)

```
$aiAvatarSuggest = new Sfolador\AiAvatarSuggest();
echo $aiAvatarSuggest->suggest('A developer with a red beard and a cool hat');

//or if you want to use the facade

echo AiAvatarSuggest::suggest('A developer with a red beard and a cool hat');
```

You can also invoke the generation by calling the route `ai-avatar-suggest` with a `prompt` parameter. The response will be a JSON with the suggested email, such as:

```
{
  "suggestion": "https://www.example.com/link/to/avatar"
}
```

Cache clear
-----------

[](#cache-clear)

If you use a Cache driver that supports tags, you can clear the cache by invoking the command:

```
php artisan ai-avatar-suggest:clear-cache
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [sfolador](https://github.com/sfolador)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.2% 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 ~12 days

Total

3

Last Release

1227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c6b8884e3bd4e86d26de024ca07094728adc7db2a8a483538222121b00f9f1?d=identicon)[sfolador](/maintainers/sfolador)

---

Top Contributors

[![sfolador](https://avatars.githubusercontent.com/u/36632?v=4)](https://github.com/sfolador "sfolador (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

aiavatarlaravelopenailaravelsfoladorai-avatar-suggest

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sfolador-ai-avatar-suggest/health.svg)

```
[![Health](https://phpackages.com/badges/sfolador-ai-avatar-suggest/health.svg)](https://phpackages.com/packages/sfolador-ai-avatar-suggest)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[maestroerror/laragent

Power of AI Agents in your Laravel project

639159.9k](/packages/maestroerror-laragent)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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