# ElevenLabs

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Natural text-to-speech for ad voiceovers using Eleven Flash/Turbo and Multilingual models.

**Category:** AI / Audio | **Website:** [elevenlabs.io](https://elevenlabs.io) | **Docs:** [elevenlabs.io/docs/api-reference/text-to-speech/convert](https://elevenlabs.io/docs/api-reference/text-to-speech/convert)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **x402 (Base)** | `https://elevenlabs.x402.beta.paywithlocus.com/elevenlabs/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://api.beta.paywithlocus.com/api/wrapped/elevenlabs/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://elevenlabs.x402.beta.paywithlocus.com/openapi.json`

## Endpoints

### Text to Speech

Convert text to MP3 or PCM speech with a curated or custom ElevenLabs voice ID.

**Estimated cost:** $0.05/1K chars (Turbo/Flash) or $0.10/1K chars (Multilingual) + $0.003

**Payment:** x402 `exact`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `text` | string | Yes | Text to synthesize. |
| `voice_id` | string | Yes | ElevenLabs voice ID, including custom voices owned by the platform account. |
| `model_id` | string | Yes | 'eleven_turbo_v2_5', 'eleven_flash_v2_5', or 'eleven_multilingual_v2'. |
| `output_format` | string | No | 'mp3_44100_128' (default) or 'pcm_44100'. |
| `voice_settings` | object | No | Optional ElevenLabs voice stability, similarity, and style settings. |

```bash
curl -X POST https://elevenlabs.x402.beta.paywithlocus.com/elevenlabs/tts \
  -H "Content-Type: application/json" \
  -H "x-locus-request-id: <UUID from the 402 response>" \
  -d '{"text":"<string>","voice_id":"<string>","model_id":"<string>","output_format":"<string>","voice_settings":"<object>"}'
```
