> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/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.

<Note>
  ElevenLabs currently uses a custom host setup. SDK support is available through the custom host pattern.
</Note>

## Quick Start

### Text to Speech

Generate speech from text using the ElevenLabs TTS API:

```bash cURL theme={"system"}
curl -X POST https://api.portkey.ai/v1/audio/speech \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-portkey-custom-host: https://api.elevenlabs.io" \
  -H "x-portkey-provider: openai" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -d '{
    "model_id": "eleven_multilingual_v2",
    "text": "Hello! Welcome to Portkey.",
    "voice_settings": {
      "stability": 0.5,
      "similarity_boost": 0.75
    }
  }' \
  --output speech.mp3
```

## 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. Set the custom host to `https://api.elevenlabs.io`
5. Name your provider (e.g., `elevenlabs`)

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

***

## Using with Portkey SDK

You can also use ElevenLabs with the Portkey SDK using custom host configuration:

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

  portkey = Portkey(
      api_key="PORTKEY_API_KEY",
      provider="openai",
      custom_host="https://api.elevenlabs.io",
      Authorization="Bearer ELEVENLABS_API_KEY"
  )
  ```

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

  const portkey = new Portkey({
      apiKey: 'PORTKEY_API_KEY',
      provider: 'openai',
      customHost: 'https://api.elevenlabs.io',
      Authorization: 'Bearer ELEVENLABS_API_KEY'
  });
  ```
</CodeGroup>

***

## 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="/docs/product/ai-gateway">
    Add retries and timeouts for audio processing
  </Card>

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

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

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

For complete SDK documentation:

<Card title="SDK Reference" icon="code" href="/docs/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>
