> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-fix-sync-nav-diff.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ElevenLabs

> Use ElevenLabs' text-to-speech, speech-to-text, and voice cloning APIs through Portkey.

ElevenLabs provides industry-leading text-to-speech, speech-to-text, dubbing, and voice cloning capabilities. Portkey allows you to use ElevenLabs' APIs with full observability and reliability features.

The unified `/v1/audio/speech` and `/v1/audio/transcriptions` endpoints route to ElevenLabs' text-to-speech and speech-to-text APIs directly, without any custom host configuration.

## Quick Start

### Text to Speech

Generate speech from text using the ElevenLabs TTS API:

```bash cURL theme={null}
curl -X POST https://api.portkey.ai/v1/audio/speech \
  -H "Content-Type: application/json" \
  -H "x-portkey-provider: @YOUR_ELEVENLABS_PROVIDER_SLUG" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -d '{
    "model": "eleven_multilingual_v2",
    "input": "Hello! Welcome to Portkey.",
    "voice": "21m00Tcm4TlvDq8ikWAM"
  }' \
  --output speech.mp3
```

`voice` accepts any ElevenLabs voice id (premade, cloned, or custom) — it is forwarded as-is rather than remapped from OpenAI's built-in voice names.

### Speech to Text

Transcribe audio using ElevenLabs' Scribe model:

```bash cURL theme={null}
curl -X POST https://api.portkey.ai/v1/audio/transcriptions \
  -H "x-portkey-provider: @YOUR_ELEVENLABS_PROVIDER_SLUG" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -F file="@recording.mp3" \
  -F model="scribe_v1"
```

## Add Provider in Model Catalog

Before making requests, add ElevenLabs to your Model Catalog:

1. Go to [**Model Catalog → Add Provider**](https://app.portkey.ai/model-catalog/providers)
2. Select **ElevenLabs**
3. Enter your [ElevenLabs API key](https://elevenlabs.io/app/settings/api-keys)
4. Name your provider (e.g., `elevenlabs`)

<Card title="Complete Setup Guide" icon="book" href="/product/model-catalog">
  See all setup options and detailed configuration instructions
</Card>

***

## Using with Portkey SDK

<CodeGroup>
  ```python Python theme={null}
  from portkey_ai import Portkey

  portkey = Portkey(
      api_key="PORTKEY_API_KEY",
      provider="@YOUR_ELEVENLABS_PROVIDER_SLUG"
  )
  ```

  ```javascript Node.js theme={null}
  import Portkey from 'portkey-ai';

  const portkey = new Portkey({
      apiKey: 'PORTKEY_API_KEY',
      provider: '@YOUR_ELEVENLABS_PROVIDER_SLUG'
  });
  ```
</CodeGroup>

<Note>
  Other ElevenLabs APIs — voice cloning, dubbing, and voice design — aren't covered by the unified `/v1/audio/*` endpoints yet. Reach those through the [custom host pattern](/product/ai-gateway/universal-api#local-and-private-models) with `x-portkey-custom-host: https://api.elevenlabs.io` and your `xi-api-key`.
</Note>

***

## ElevenLabs Features

ElevenLabs offers advanced audio AI capabilities:

* **Text to Speech**: Convert text to natural-sounding speech in 29+ languages
* **Speech to Text**: Transcribe audio with high accuracy
* **Voice Cloning**: Clone voices from audio samples
* **Dubbing**: Automatically dub audio/video content across languages
* **Voice Design**: Generate unique AI voices

<Card icon="link" title="ElevenLabs API Documentation" href="https://elevenlabs.io/docs/api-reference">
  Explore the complete ElevenLabs API documentation
</Card>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Gateway Configs" icon="sliders" href="/product/ai-gateway">
    Add retries and timeouts for audio processing
  </Card>

  <Card title="Observability" icon="chart-line" href="/product/observability">
    Monitor and trace your ElevenLabs requests
  </Card>

  <Card title="Custom Host Setup" icon="server" href="/product/ai-gateway/universal-api#local-and-private-models">
    Learn more about custom host configuration
  </Card>

  <Card title="Metadata" icon="tag" href="/product/observability/metadata">
    Add custom metadata to track audio sources
  </Card>
</CardGroup>

For complete SDK documentation:

<Card title="SDK Reference" icon="code" href="/api-reference/sdk/list">
  Complete Portkey SDK documentation
</Card>

***

<Card title="Portkey is now PRISMA AIRS AI Gateway. See it in action." href="https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey&utm_medium=referral&utm_campaign=prisma_airs&utm_content=docs_nav#contact" icon="arrow-up-right-from-square">
  Contact Us
</Card>
