PHPackages                             autonomo/ai-speaker - 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. autonomo/ai-speaker

ActiveLibrary[API Development](/categories/api)

autonomo/ai-speaker
===================

A quick and easy extension for effortlessly handling many LLM APIs

1.0.0(6mo ago)01cc-by-nc-4.0PHPPHP &gt;=8.0

Since Feb 27Pushed 6mo agoCompare

[ Source](https://github.com/AutonomoDev/AISpeaker-PHP)[ Packagist](https://packagist.org/packages/autonomo/ai-speaker)[ Docs](https://www.autonomous.codes/)[ RSS](/packages/autonomo-ai-speaker/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

AISpeaker
=========

[](#aispeaker)

[![Maintainability](https://camo.githubusercontent.com/8da10a23814e48261342fb858d64d903cf4834de25797a861325ec59201cfee0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62613035623565626661366262323131363139652f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/phpexpertsinc/RESTSpeaker/maintainability)[![Test Coverage](https://camo.githubusercontent.com/01318f7af7e9d2d65960fdf5bef48477b6acb61ca49dba5346d2a6974c9dbac2/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62613035623565626661366262323131363139652f746573745f636f766572616765)](https://codeclimate.com/github/phpexpertsinc/RESTSpeaker/test_coverage)

AISpeaker is a project of Autonomo AI, FZCO, meant to ease the accessing of the OpenAI APIs.

This library uses [RESTSpeaker](https://packagist.org/package/phpexperts/rest-speaker)to utilize the Guzzle HTTP Client via the Composition architectural pattern.

You might be very interested in the projects that used by and/or adjacent to this project:

- **PHP Evolver**
    - `composer require phpexperts/evolver`
    - One of only two Genetic Algorithm (GA) libraries for PHP, but very easy to use.
    - One of the few AI / Machine Learning libraries for PHP.
    -
- **RESTSpeaker**
    - `composer require phpexperts/rest-speaker`
    - A very easy way to consume REST APIs. Built on top of Guzzle but with a much better interface.
    -
- **SimpleDTO**
    - `composer require phpexperts/simple-dto`
    - Easily build validating DTOs for PHP 7.2+.
    -

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

[](#installation)

Via Composer

```
composer require autonomo/ai-speaker
```

Copy `.env.example` to `.env` in your project's root directory and put in your OpenAI credentials.

Change log
----------

[](#change-log)

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

Usage
-----

[](#usage)

By default, JSON results are returned.

```
    $chatGPT = new AISpeaker();

    $prompt = returnText();

    $prompt = http->testHandler->getRecords()[0];

Output:
curl 'https://api.openai.com/v1/chat/completions' -A 'PHPExperts/RESTSpeaker-2.4 (PHP 8.3.3)' \
   -H 'Content-Type: application/json'  -H 'Authorization: Bearer [redacted]' \
   -X POST  -d '{"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Say 'Hello, World!'."}]}'
```

(From RESTSpeaker) To get the raw payload as returned by api.openai.com:

```
$rawReturn = (string)$chatGPT->api->getLastResponse()->getBody();
```

Use cases
=========

[](#use-cases)

✔ Returns the same responses as chat.openai.com.

Testing
-------

[](#testing)

```
phpunit
```

Roadmap
=======

[](#roadmap)

- Implement the Models endpoint
- Implement the Images endpoints
- Implement the Files endpoint
- Implement the Audio endpoints
- Implement the new Embeddings endpoints for AI Model Training
- Implement the new Fine Tunings Endpoints for custom GPT Agents
- Implement the Moderations endpoint
- Implement support for the GPT5 Agents

Contributors
============

[](#contributors)

[Theodore R. Smith](https://www.autonomo.codes/%5D) GPG Fingerprint: 6CAC F838 454C 8912 8AA2 26DB 89DC D8F1 3BB9 33B3 CEO: PHP Experts, Inc.

License
-------

[](#license)

**CC-BY-ND-4.0**Creative Commons NoDerivations v4.0: Please see the [license file](LICENSE) for more information.

**YOU MAY FORK THIS PROJECT.**

**YOU MAY NOT PUBLISH ANY DERIVATION of this project to either your own website or a third-party host.**

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance66

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~600 days

Total

2

Last Release

201d ago

Major Versions

v0.9.0 → 1.0.02025-10-20

PHP version history (2 changes)v0.9.0PHP &gt;=7.4

1.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f3a2dd16766f6b03c330e65aaca9dfb97f1bbbb41c5e2af5681f58f670b7917?d=identicon)[hopeseekr](/maintainers/hopeseekr)

---

Top Contributors

[![hopeseekr](https://avatars.githubusercontent.com/u/1125541?v=4)](https://github.com/hopeseekr "hopeseekr (6 commits)")

---

Tags

apiopenaigptChatGptgpt4

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/autonomo-ai-speaker/health.svg)

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

###  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)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-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)

PHPackages © 2026

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