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

# ElevenLabs V4 Turbo TTS

> ElevenLabs V4 Turbo TTS API 可将最多 5,000 个字符的文本转换为更低延迟的语音，支持音色、稳定性和相似度控制。可从 19 种音频格式中选择一种，并可选择将时间戳作为单独文件返回。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

`elevenlabs-v4-turbo-tts` 将文本转换为低延迟的语音音频。结果以任务 `files` 返回，与图像、视频、3D 和音频任务的标准响应结构一致。

## 模型

* **elevenlabs-v4-turbo-tts** - ElevenLabs V4 Turbo 文本转语音生成

## 必填参数

* **text**：要转换为语音的文本
  * 长度：`1-5000` 个字符，需包含非空白文本

## 可选参数

* **voice**：音色名称或音色 ID。默认：`Rachel`
* **stability**：音色稳定性，`0` 到 `1`。默认：`0.5`
* **similarity\_boost**：音色相似度，`0` 到 `1`。默认：`0.75`
* **language\_code**：可选的 ISO 639-1 语言代码
* **apply\_text\_normalization**：`auto`、`on` 或 `off`。默认：`auto`
* **timestamps**：布尔值。为 `true` 时，时间数据可能作为单独的 JSON 文件返回。默认：`false`
* **output\_format**：音频编码、采样率和码率。默认：`mp3_44100_128`
* **callback\_url**：可选的 Webhook URL，用于任务完成通知

## 输出格式

支持的值：`mp3_22050_32`、`mp3_44100_32`、`mp3_44100_64`、`mp3_44100_96`、`mp3_44100_128`、`mp3_44100_192`、`pcm_8000`、`pcm_16000`、`pcm_22050`、`pcm_24000`、`pcm_44100`、`pcm_48000`、`ulaw_8000`、`alaw_8000`、`opus_48000_32`、`opus_48000_64`、`opus_48000_96`、`opus_48000_128`、`opus_48000_192`。

MP3 和 Opus 是编码音频。PCM 是不带 WAV 头的原始音频。µ-law 和 A-law 是电话通信格式。输出保留原始编码和文件扩展名。解码原始音频时请使用所选的采样率。

## 示例

### 默认语音

```json theme={"dark"}
{
  "model": "elevenlabs-v4-turbo-tts",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "text": "Hello! Welcome to PoYo.",
    "voice": "Rachel",
    "stability": 0.5,
    "similarity_boost": 0.75,
    "apply_text_normalization": "auto"
  }
}
```

### 带时间戳的原始 PCM

```json theme={"dark"}
{
  "model": "elevenlabs-v4-turbo-tts",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "text": "Welcome to PoYo.",
    "timestamps": true,
    "output_format": "pcm_24000"
  }
}
```

## 注意事项

* 通过标准任务状态 API 查询状态。
* 成功响应返回 `files`。生成的语音使用 `file_type: audio`。
* 启用 `timestamps` 且返回了时间数据时，时间 JSON 是一个单独的文件项，`file_type: other`。


## OpenAPI

````yaml zh/api-manual/music-series/elevenlabs-v4-turbo-tts.json POST /api/generate/submit
openapi: 3.1.0
info:
  title: PoYo AI - ElevenLabs V4 Turbo TTS API
  description: >-
    ElevenLabs V4 Turbo TTS API 可将最多 5,000 个字符的文本转换为低延迟语音，支持音色、稳定性和相似度控制。可从 19
    种音频格式中选择，并可选择以单独文件返回时间戳。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - ElevenLabs V4 Turbo TTS
      summary: 提交 ElevenLabs V4 Turbo TTS 任务
      description: 快速生成语音，支持音色控制、19 种音频格式和可选时间戳。
      operationId: submit_elevenlabs_v4_turbo_tts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              example-1:
                value:
                  model: elevenlabs-v4-turbo-tts
                  input:
                    text: Hello! Welcome to PoYo.
              example-2:
                value:
                  model: elevenlabs-v4-turbo-tts
                  input:
                    text: Welcome to PoYo.
                    timestamps: true
                    output_format: pcm_24000
      responses:
        '200':
          description: 任务已受理；请查询任务获取最终文件。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - elevenlabs-v4-turbo-tts
        input:
          $ref: '#/components/schemas/ModelInput'
        callback_url:
          type: string
          format: uri
          description: 可选的完成或失败回调 URL。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2026-10-13T10:30:00+08:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
    ModelInput:
      type: object
      required:
        - text
      properties:
        output_format:
          type: string
          enum:
            - mp3_22050_32
            - mp3_44100_32
            - mp3_44100_64
            - mp3_44100_96
            - mp3_44100_128
            - mp3_44100_192
            - pcm_8000
            - pcm_16000
            - pcm_22050
            - pcm_24000
            - pcm_44100
            - pcm_48000
            - ulaw_8000
            - alaw_8000
            - opus_48000_32
            - opus_48000_64
            - opus_48000_96
            - opus_48000_128
            - opus_48000_192
          default: mp3_44100_128
          description: 音频编码、采样率和码率。
        language_code:
          type: string
          description: ISO 639-1 语言代码。
        apply_text_normalization:
          type: string
          enum:
            - auto
            - 'on'
            - 'off'
          default: auto
          description: 规范化数字和日期。
        stability:
          type: number
          default: 0.5
          maximum: 1
          minimum: 0
          description: 音色稳定性，范围 0 到 1。
        text:
          type: string
          minLength: 1
          maxLength: 5000
          description: 文本。须包含非空白文本。
        voice:
          type: string
          default: Rachel
          minLength: 1
          description: 用于单人语音的预置音色。须包含非空白文本。
        similarity_boost:
          type: number
          default: 0.75
          maximum: 1
          minimum: 0
          description: 音色相似度，范围 0 到 1。
        timestamps:
          type: boolean
          default: false
          description: 可用时以单独的 JSON 文件返回时间数据。
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.