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

# ElevenLabs 创建音色

> - 保存用户明确选中的 generated_voice_id，返回完整音色对象和 voice_id
- 创建免费；请自行保存 voice_id，平台不提供音色列表、查询或找回功能
- 异步处理模式，使用返回的任务ID [进行查询](/pages/zh/api-manual/task-management/get-task-detail)
- 完成后 `results[0]` 返回完整音色对象，其中 `voice_id` 可用于后续语音合成。
- 请务必自行保存生成的 `voice_id`；平台不提供音色列表、查询或找回功能。任务查询仍可使用，但不能替代自行保存音色 ID。


`elevenlabs-voice-create` 将已选中的设计候选保存为可用于语音合成的音色。**创建免费**；音色设计和之后的语音合成分别按各模型计费。

先调用 [Voice Design](https://docs.aihubmax.com/pages/zh/api-manual/audio-series/elevenlabs/elevenlabs-voice-design.md)，展示全部候选的试听，取得用户的明确选择后再调用本模型。传入非空 `voice_name`、20–1000字符的 `voice_description`，以及所选候选的 `generated_voice_id`；这三个字段去除首尾空白后校验。可选 `labels` 为字符串键值对象。

每个候选只能创建一次，且可能过期。不要把 `generated_voice_id` 当作永久合成 ID；提交成功后保存任务 ID，[查询任务](https://docs.aihubmax.com/pages/zh/api-manual/task-management/get-task-detail.md)并等待 `status=completed`。

`results[0]` 是完整音色对象，关键字段为 `voice_id`、`name`、`description`、`labels`、`preview_url`、`category`、`settings`，并保留实际返回的采样、训练、共享、验证、权限与其他元数据。部分字段可缺省或为null，不补造试听链接。具体结构见[任务特殊结果](https://docs.aihubmax.com/pages/zh/api-manual/task-management/get-task-detail.md#特殊格式)。

> [!WARNING]
>
> 请务必自行保存生成的 `voice_id`。平台不提供音色列表、音色查询或 ID 找回功能。任务查询仍可使用，但不能替代自行保存音色 ID。

保存后，可把原始 `voice_id` 用于 [Custom Voice Speech](https://docs.aihubmax.com/pages/zh/api-manual/audio-series/elevenlabs/eleven-v4-text-to-speech.md) 或 [Custom Voice Dialogue](https://docs.aihubmax.com/pages/zh/api-manual/audio-series/elevenlabs/eleven-v4-text-to-dialogue.md)。音色仍须有效且可访问；创建成功不代表永久可用、可跨服务使用或由某个调用者独享。此接口不提供音色编辑、删除或 remix。


## OpenAPI

````yaml openapi/zh/elevenlabs-voice-create.json POST /v1/audios/generations
openapi: 3.1.0
info:
  title: ElevenLabs Voice Create
  version: '1.0'
servers:
  - url: https://api.aihubmax.com/e
security:
  - BearerAuth: []
paths:
  /v1/audios/generations:
    post:
      tags:
        - Audio > Voice Creation
      summary: ElevenLabs Voice Create
      description: >
        - 保存用户明确选中的 generated_voice_id，返回完整音色对象和 voice_id

        - 创建免费；请自行保存 voice_id，平台不提供音色列表、查询或找回功能

        - 异步处理模式，使用返回的任务ID
        [进行查询](/pages/zh/api-manual/task-management/get-task-detail)

        - 完成后 `results[0]` 返回完整音色对象，其中 `voice_id` 可用于后续语音合成。

        - 请务必自行保存生成的 `voice_id`；平台不提供音色列表、查询或找回功能。任务查询仍可使用，但不能替代自行保存音色 ID。
      operationId: elevenlabs-voice-create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElevenLabsVoiceCreateRequest'
            examples:
              保存用户明确选中的候选音色:
                summary: 保存用户明确选中的候选音色
                value:
                  model: elevenlabs-voice-create
                  voice_name: 温暖中文旁白
                  voice_description: 自然、温暖、清晰的成年中文旁白声音，适合长篇讲解。
                  generated_voice_id: selected-generated-voice-id
                  labels:
                    language: zh
      responses:
        '200':
          $ref: '#/components/responses/TaskCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ElevenLabsVoiceCreateRequest:
      type: object
      required:
        - model
        - voice_name
        - voice_description
        - generated_voice_id
      properties:
        model:
          const: elevenlabs-voice-create
          description: >-
            `elevenlabs-voice-create`：保存选中候选并返回 voice_id，创建免费；请自行保存
            ID，平台不提供音色查询或找回功能。
          enum:
            - elevenlabs-voice-create
          examples:
            - elevenlabs-voice-create
          type: string
          default: elevenlabs-voice-create
        voice_name:
          description: 音色名称。
          minLength: 1
          type: string
          example: 温暖中文旁白
        voice_description:
          description: 音色描述；去除首尾空白后 20–1000 字符。
          maxLength: 1000
          minLength: 20
          type: string
          example: 自然、温暖、清晰的成年中文旁白声音，适合长篇讲解。
        generated_voice_id:
          description: Design 返回、且用户明确选中的候选 ID。每个候选只能创建一次；候选可能过期，选定后请及时保存。
          minLength: 1
          type: string
          example: selected-generated-voice-id
        labels:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          default: null
          description: 自定义标签，键和值均为字符串。
          example:
            language: zh
      additionalProperties: false
    TaskResponse:
      type: object
      properties:
        created:
          type: integer
          description: 任务创建时间戳
          example: 1757165031
        id:
          type: string
          description: 任务ID
          example: task-unified-1757165031-uyujaw3d
        model:
          type: string
          description: 实际使用的模型名称
        object:
          type: string
          description: 任务的具体类型
          enum:
            - audio.generation.task
        progress:
          type: integer
          description: 任务进度百分比 (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: 任务状态
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          type: object
          description: 异步任务信息
          properties:
            can_cancel:
              type: boolean
              description: 任务是否可以取消
              example: true
            estimated_time:
              type: integer
              description: 预计完成时间（秒）
              example: 45
        type:
          type: string
          description: 任务的输出类型
          enum:
            - audio
          example: audio
    ErrorResponse400:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 请求格式错误
            type:
              type: string
              example: invalid_request_error
    ErrorResponse401:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: API密钥无效
            type:
              type: string
              example: authentication_error
    ErrorResponse402:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 账户余额不足
            type:
              type: string
              example: insufficient_quota
    ErrorResponse422:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 参数校验失败
            type:
              type: string
              example: validation_error
    ErrorResponse429:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 请求频率超限
            type:
              type: string
              example: rate_limit_error
    ErrorResponse500:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 服务器内部错误
            type:
              type: string
              example: server_error
    ErrorResponse503:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 服务暂不可用，请稍后重试
            type:
              type: string
              example: service_unavailable
  responses:
    TaskCreated:
      description: 任务创建成功
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TaskResponse'
    BadRequest:
      description: 请求格式错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse401'
    PaymentRequired:
      description: 余额不足
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse402'
    UnprocessableEntity:
      description: 参数校验失败
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse422'
    TooManyRequests:
      description: 请求频率超限
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse429'
    InternalServerError:
      description: 服务器内部错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse500'
    ServiceUnavailable:
      description: 服务暂不可用
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse503'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        ## 所有接口均需要使用Bearer Token进行认证 ##

        使用时在请求头中添加：

        `Authorization: Bearer YOUR_API_KEY`

````

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