PHPackages                             talendor/elevenlabs-api - 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. talendor/elevenlabs-api

ActiveLibrary[API Development](/categories/api)

talendor/elevenlabs-api
=======================

Laravel wrapper client for Elevenlabs api

1.0.2(2y ago)11451MITPHPPHP ^8.0

Since Oct 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fabioferreira3/elevenlabs-api)[ Packagist](https://packagist.org/packages/talendor/elevenlabs-api)[ RSS](/packages/talendor-elevenlabs-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Laravel ElevenLabs Voice Generation Wrapper
===========================================

[](#laravel-elevenlabs-voice-generation-wrapper)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE.md)

This is a Laravel package that serves as a wrapper for ElevenLabs Voice Generation API. It provides an easy-to-use interface for generating voices based on provided content.

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

[](#installation)

You can install the package via Composer. Run the following command:

```
composer require talendor/elevenlabs-api
```

Usage
-----

[](#usage)

To get started, make sure to set up your ElevenLabs API key. You can do this by adding the following key to your .env file:

```
ELEVEN_API_KEY=your-api-key
```

You can then use the package by accessing the ElevenLabsClient instance. For example, you can add the following route to your web.php or api.php file to test that the library is working:

```
use Talendor\ElevenLabsClient\Facades\ElevenLabsClient;

Route::get('/test_elevenlabsclient', function() {
    $elevenLabsClient = app()->make(ElevenLabsClient::class);
    return $elevenLabsClient->voices()->getAll();
});
```

**Voice Class**
===============

[](#voice-class)

Namespace
---------

[](#namespace)

`Talendor\ElevenLabsClient\Voice`

Class Description
-----------------

[](#class-description)

The `Voice` class is a part of the `Talendor\ElevenLabsClient\Voice` namespace. It implements the `VoiceInterface`.

### `getAll()`

[](#getall)

Retrieve all the available voices.

---

### `getVoice(string $voice_id)`

[](#getvoicestring-voice_id)

Returns metadata about a specific voice.

---

### `defaultSettings()`

[](#defaultsettings)

Gets the default settings for voices.

---

### `voiceSettings(string $voice_id)`

[](#voicesettingsstring-voice_id)

---

### `addVoice(string $name, ?string $description, string $files, ?string $labels = "American")`

[](#addvoicestring-name-string-description-string-files-string-labels--american)

Add a new voice to your collection of voices in VoiceLab.

**Parameters:**

- `$name` (string): The name of the voice.
- `$description` (string|null): The description of the voice.
- `$files` (string): The file path of the voice.
- `$labels` (string|null, default: "American"): The labels for the voice.

---

### `editVoice(string $voice_id, string $name, ?string $description, ?string $files, ?string $labels = "American")`

[](#editvoicestring-voice_id-string-name-string-description-string-files-string-labels--american)

Edit a voice in your collection of voices in VoiceLab.

**Parameters:**

- `$voice_id` (string): The ID of the voice.
- `$name` (string): The new name of the voice.
- `$description` (string|null): The new description of the voice.
- `$files` (string|null): The new file path of the voice.
- `$labels` (string|null, default: "American"): The new labels for the voice.

---

### `deleteVoice(string $voice_id)`

[](#deletevoicestring-voice_id)

Delete a specific voice from your collection of voices in VoiceLab.

**Parameters:**

- `$voice_id` (string): The ID of the voice.

TextToSpeech class
==================

[](#texttospeech-class)

Namespace
---------

[](#namespace-1)

`Talendor\ElevenLabsClient\TextToSpeech`

Class Description
-----------------

[](#class-description-1)

The `TextToSpeech` class is a part of the `Talendor\ElevenLabsClient\TextToSpeech` namespace. It implements the `TextToSpeechInterface`.

### `generate(string $content, string $voice_id , ?bool $optimize_latency, ?string $model_id, ?array $voice_settings = [])`

[](#generatestring-content-string-voice_id--bool-optimize_latency-string-model_id-array-voice_settings--)

---

### `generate_stream(string $content, string $voice_id , ?bool $optimize_latency, ?string $model_id , ?array $voice_settings = [])`

[](#generate_streamstring-content-string-voice_id--bool-optimize_latency-string-model_id--array-voice_settings--)

History
=======

[](#history)

Namespace
---------

[](#namespace-2)

`Talendor\ElevenLabsClient\History`

Class Description
-----------------

[](#class-description-2)

The `History` class is a part of the `Talendor\ElevenLabsClient\History` namespace. It implements the `HistoryInterface`.

### `getHistory()`

[](#gethistory)

Returns metadata about all your generated audio.

---

### `getHistoryItem(string $history_item_id)`

[](#gethistoryitemstring-history_item_id)

Returns information about a history item by its ID.

### Parameters

[](#parameters)

- `$history_item_id` (string): The ID of the history item.

---

### `getHistoryItemAudio(string $history_item_id, string $fileName)`

[](#gethistoryitemaudiostring-history_item_id-string-filename)

Returns the audio of a history item.

### Parameters

[](#parameters-1)

- `$history_item_id` (string): The ID of the history item.
- `$fileName` (string): The desired file name for the audio file.

---

### `deleteHistoryItem(string $history_item_id)`

[](#deletehistoryitemstring-history_item_id)

Delete a history item by its ID.

### Parameters

[](#parameters-2)

- `$history_item_id` (string): The ID of the history item.

---

### `downloadHistory(array $history_items, string $filename)`

[](#downloadhistoryarray-history_items-string-filename)

Download one or more history items. If one history item ID is provided, a single audio file will be returned. If multiple history item IDs are provided, the history items will be packed into a .zip file.

### Parameters

[](#parameters-3)

- `$history_items` (array): An array of history item IDs.
- `$filename` (string): The desired file name for the downloaded file.

`Models` Class
==============

[](#models-class)

Available Methods
-----------------

[](#available-methods)

### `getModels()`

[](#getmodels)

Gets a list of available models.

**Return Type:** `array`

`User` Class
============

[](#user-class)

Namespace
---------

[](#namespace-3)

`Talendor\ElevenLabsClient\User`

Class Description
-----------------

[](#class-description-3)

The `User` class is a part of the `Talendor\ElevenLabsClient\User` namespace. It implements the `UserInterface`.

Available Methods
-----------------

[](#available-methods-1)

### `getUserInfo()`

[](#getuserinfo)

Gets information about the user.

**Return Type:** `array`

**Description:**This method retrieves information about the current user. It sends a GET request to the `user` endpoint and returns the decoded response data as an array.

### `getUserSubscription()`

[](#getusersubscription)

Gets extended information about the user's subscription.

**Return Type:** `array`

**Description:**This method retrieves extended information about the current user's subscription. It sends a GET request to the `user/subscription` endpoint and returns the decoded response data as an array.

Feel free to use these methods in your Laravel application to interact with the ElevenLabs Voice Generation API.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~0 days

Total

3

Last Release

948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c88fef126d379a6713b32ab26ec1e303494cf51ef4e485ab6bea62bfbb6f1fe?d=identicon)[fabioferreira](/maintainers/fabioferreira)

---

Top Contributors

[![fabioferreira3](https://avatars.githubusercontent.com/u/45289455?v=4)](https://github.com/fabioferreira3 "fabioferreira3 (2 commits)")[![solomonjames](https://avatars.githubusercontent.com/u/727744?v=4)](https://github.com/solomonjames "solomonjames (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/talendor-elevenlabs-api/health.svg)

```
[![Health](https://phpackages.com/badges/talendor-elevenlabs-api/health.svg)](https://phpackages.com/packages/talendor-elevenlabs-api)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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