> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Convert text to speech and manage voices with ElevenLabs

> Give Guild agents the ability to convert text to speech, manage custom voices, and query audio generation history with server-side API key auth.

Integrations · ElevenLabs

A Guild agent converts text to speech, manages custom voices, and queries audio generation history on your behalf. Guild stores the ElevenLabs API key server-side and injects it into every request, so agent code never sees it. Credential policies let you restrict which operations each agent may call, and every request runs through Guild's audit trail.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use ElevenLabs.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect ElevenLabs to your first agent.

## What the ElevenLabs integration exposes

The integration provides tools for text-to-speech conversion with audio streaming, full voice lifecycle management including add, edit, and delete, and voice settings control covering stability and similarity boost. Additional tools cover audio generation history retrieval and download, sample management, and user subscription details.

## How it works

**1. Open credentials in Guild**

Go to Access & setup > Credentials in your Guild account or organization. Click Connect and search for elevenlabs.

**2. Paste your API key**

Enter your ElevenLabs API key into the API Key field. Guild stores it and sends it as the xi-api-key header on every agent request.

**3. Import tools in your agent**

Import ElevenlabsTools from the `guildai~elevenlabs` package and spread it into your agent's tools object. Use pick() to include only the tools your agent needs.

## Why ElevenLabs access needs governing

ElevenLabs tools can create and delete voices, download audio history, and read subscription details. Guild's credential proxy enforces credential policies before any request leaves Guild: you write ALLOW and DENY rules scoped to specific operations, agents, or workspaces. A DENY rule always wins over an ALLOW rule, so you can block destructive operations such as voice deletion while permitting read and synthesis operations.

Credentials are scoped to an account, workspace, member, or single agent, so a dedicated credential for one agent never serves another. Guild injects the API key server-side; agents never evaluate the key themselves and cannot bypass policy checks. Teams that need a tighter boundary can restrict a workspace to its own credentials, cutting off any shared account credentials entirely.

## About the ElevenLabs integration

Agents can convert text to speech using any available voice and stream the resulting audio. They can add, edit, and delete custom voices and adjust voice settings. Agents can also query and manage audio generation history and retrieve user subscription details. The integration is `guildai~elevenlabs`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `xi-api-key: <key>`

### Setup

**1. Connect ElevenLabs**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **elevenlabs**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { ElevenlabsTools } from "@guildai-services/guildai~elevenlabs"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with ElevenLabs.",
  tools: { ...ElevenlabsTools },
})
```

### Selecting specific tools

Tools are named with the `elevenlabs_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~elevenlabs`:

| Tool | What it does |
| - | - |
| `elevenlabs_add_voice_v1_voices_add_post` | Add a new voice to your collection of voices in VoiceLab. |
| `elevenlabs_delete_history_items_v1_history_delete_post` | Delete a number of history items by their IDs. |
| `elevenlabs_delete_history_item_v1_history_history_item_id_delete` | Delete a history item by its ID |
| `elevenlabs_delete_sample_v1_voices_voice_id_samples_sample_id_delete` | Removes a sample by its ID. |
| `elevenlabs_delete_voice_v1_voices_voice_id_delete` | Deletes a voice by its ID. |
| `elevenlabs_download_history_items_v1_history_download_post` | Download one or more history items. |
| `elevenlabs_edit_voice_settings_v1_voices_voice_id_settings_edit_post` | Edit your settings for a specific voice. "similarity\_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. |
| `elevenlabs_edit_voice_v1_voices_voice_id_edit_post` | Edit a voice created by you. |
| `elevenlabs_get_default_voice_settings_v1_voices_settings_default_get` | Gets the default settings for voices. "similarity\_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. |
| `elevenlabs_get_generated_items_v1_history_get` | Returns metadata about all your generated audio. |
| `elevenlabs_get_user_info_v1_user_get` | Gets information about the user |
| `elevenlabs_get_user_subscription_info_v1_user_subscription_get` | Gets extended information about the users subscription |
| `elevenlabs_get_voice_settings_v1_voices_voice_id_settings_get` | Returns the settings for a specific voice. "similarity\_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. |
| `elevenlabs_get_voices_v1_voices_get` | Gets a list of all available voices for a user. |
| `elevenlabs_get_voice_v1_voices_voice_id_get` | Returns metadata about a specific voice. |
| `elevenlabs_text_to_speech_v1_text_to_speech_voice_id_stream_post` | Converts text into speech using a voice of your choice and returns audio as an audio stream. |

## Frequently asked questions

> [accordion] Can an agent stream audio directly or does it get a file back?
>
> The text-to-speech tool calls the streaming endpoint and returns audio as an audio stream.

> [accordion] Does the integration support webhook events from ElevenLabs?
>
> No. The catalog entry lists no webhook events for ElevenLabs, so event-triggered runs from ElevenLabs are not available.

> [accordion] How do I stop one agent from deleting voices while another can?
>
> Write a credential policy with a DENY rule on the delete voice and delete history operations scoped to the agent that should not use them. Guild's proxy blocks those calls before they reach ElevenLabs. See [Credential policies](https://docs.guild.ai/platform/credential-policies.md) for rule syntax.

> [accordion] Can I give one agent its own ElevenLabs key separate from the shared org credential?
>
> Yes. Connect a dedicated credential from the installed agent's detail page. That credential serves only that agent and never applies to other agents or workspaces. See [Credentials](https://docs.guild.ai/platform/credentials.md) for scoping options.

## Put a governed agent on ElevenLabs this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use ElevenLabs.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect ElevenLabs to your first agent.

## Related

**Also runs on Guild:** [Anthropic](https://docs.guild.ai/integrations/anthropic.md) · [DeepSeek](https://docs.guild.ai/integrations/deepseek.md) · [Gemini](https://docs.guild.ai/integrations/gemini.md) · [Meta](https://docs.guild.ai/integrations/meta.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
