---
title: &quot;RunAPI 経由で Hermes Agent で ElevenLabs を使う — TTS &amp; 音声 API ガイド&quot;
url: &quot;https://runapi.ai/ja/hermes-elevenlabs.md&quot;
canonical: &quot;https://runapi.ai/ja/hermes-elevenlabs&quot;
locale: &quot;ja&quot;
model: &quot;elevenlabs&quot;
---

# Hermes Agent で ElevenLabs を使う。

ElevenLabs は RunAPI 経由で6つの音声エンドポイントを提供します——サブ秒のレイテンシを持つ turbo-v2.5 TTS、29言語をカバーする multilingual-v2、複数話者の会話向け dialogue-v3、効果音、音声からの文字起こし、ボーカル分離です。Hermes Agent は custom:runapi プロバイダー経由で、1つの API キーでこれらを呼び出します。

## API example

```bash
curl -X POST https://runapi.ai/api/v1/elevenlabs/text_to_speech \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;text-to-speech-turbo-v2.5&quot;,
    &quot;text&quot;: &quot;Welcome to RunAPI. This audio was generated by ElevenLabs turbo v2.5.&quot;,
    &quot;speed&quot;: 1.0,
    &quot;stability&quot;: 0.5,
    &quot;similarity_boost&quot;: 0.75
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;text-to-speech-turbo-v2.5&quot;
}

```

## How it works

1. **Configure RunAPI** — Set RUNAPI_API_KEY in the environment where Hermes Agent runs. If you already added RunAPI as a custom:runapi provider, the same key and base_url handle all ElevenLabs endpoints — TTS, STT, dialogue, sound effects, and audio isolation.
2. **Call text_to_speech** — Send a POST to the text_to_speech endpoint with model set to text-to-speech-turbo-v2.5, the text you want spoken, and optional voice, speed, and stability parameters. Hermes Agent routes the request through the custom:runapi provider. For multilingual output, use text-to-speech-multilingual-v2 with a voice and language_code.
3. **Poll for the result** — The endpoint returns a task_id immediately. Poll the task status endpoint until the status is completed, then read the output audio URL from the response.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | Required. text-to-speech-turbo-v2.5 (low latency) or text-to-speech-multilingual-v2 (29 languages). |
| `text` | `string` | Required. The text to convert to speech. Max 5000 characters. |
| `voice` | `string` | ElevenLabs voice ID. Required for multilingual-v2. Turbo-v2.5 uses a default voice if omitted. |
| `speed` | `float` | Optional. Playback speed multiplier. Range 0.7 to 1.2. |
| `stability` | `float` | Optional. Voice consistency. Range 0.0 to 1.0. Lower values add expressiveness. |
| `similarity_boost` | `float` | Optional. Voice similarity enforcement. Range 0.0 to 1.0. |
| `style` | `float` | Optional. Style exaggeration. Range 0.0 to 1.0. |
| `language_code` | `string` | Optional. Target language for multilingual-v2, e.g. en, es, ja. |
| `callback_url` | `string` | Optional. Webhook URL that receives a POST when the task completes. |

## FAQ

### Can I use ElevenLabs in Hermes Agent?

Yes. Configure RunAPI as a custom:runapi provider in Hermes Agent with base_url https://runapi.ai/v1 and key_env RUNAPI_API_KEY, then call any ElevenLabs endpoint -- text_to_speech, speech_to_text, text_to_dialogue, text_to_sound, or isolate_audio.

### What stability and similarity settings produce the most natural voice?

Start with stability at 0.5 and similarity_boost at 0.75. Higher stability makes the voice more consistent but less expressive. Higher similarity keeps the voice closer to the original profile. For audiobooks, try stability 0.6-0.8. For conversational content, lower stability (0.3-0.5) adds natural variation.

### How do I reduce ElevenLabs costs for long-form content like audiobooks?

Use turbo-v2.5 for English content -- it costs roughly half as much per character as multilingual-v2. Break long texts into chunks under 5000 characters per request. Use the RunAPI batch approach to process chapters in parallel rather than sequentially.

### Can I transcribe audio with ElevenLabs in Hermes Agent?

Yes. Call the speech_to_text endpoint at /api/v1/elevenlabs/speech_to_text with a source_audio_url. The endpoint supports optional speaker diarization via the diarize parameter and audio event tagging via tag_audio_events. Results are returned asynchronously.

### How does audio isolation work through RunAPI?

Call the isolate_audio endpoint at /api/v1/elevenlabs/isolate_audio with a source_audio_url pointing to your mixed audio file. The endpoint extracts vocals from background noise and returns a cleaned audio URL. The task is async -- poll or use a callback_url.

### Can Hermes Agent chain ElevenLabs TTS with video generation in one workflow?

Yes. Hermes Agent can generate speech with ElevenLabs, then pass the audio URL to InfiniteTalk for avatar video or to Wan for speech-to-video, creating a complete text-to-spoken-video pipeline in one run.


## Links

- [Hermes Agent セットアップガイド →](https://runapi.ai/ja/hermes-agent)
- [ElevenLabs モデル →](https://runapi.ai/ja/models/elevenlabs)
- [Model catalog](https://runapi.ai/ja/models)
- [API docs](https://runapi.ai/ja/docs)
