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

# Seed-Audio 1.0 音频生成

> - 多模态音频生成，支持**纯文本生成**、**参考音频生成（音色复刻）**、**参考图片生成**三种模式
- 单次最长支持 `120` 秒音频输出
- 异步处理模式，使用返回的任务ID [进行查询](/cn/api-manual/task-management/get-task-detail)
- 生成的音频链接有效期为 24 小时，请尽快保存



## OpenAPI

````yaml cn/api-manual/audio-series/doubao-seed-audio/doubao-seed-audio-1-0.json POST /v1/audios/generations
openapi: 3.1.0
info:
  title: Seed-Audio 1.0 音频生成接口
  description: >-
    Seed-Audio 1.0 多模态音频生成接口。支持纯文本生成、参考音频生成（音色复刻）、参考图片生成三种模式，单次最长输出 120
    秒音频，适用于有声书、配音、游戏等场景。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: 音频生成
    description: Seed-Audio 1.0 音频生成相关接口
paths:
  /v1/audios/generations:
    post:
      tags:
        - 音频生成
      summary: Seed-Audio 1.0 音频生成
      description: >-
        - 多模态音频生成，支持**纯文本生成**、**参考音频生成（音色复刻）**、**参考图片生成**三种模式

        - 单次最长支持 `120` 秒音频输出

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

        - 生成的音频链接有效期为 24 小时，请尽快保存
      operationId: createSeedAudio10
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedAudioRequest'
            examples:
              basic:
                summary: 纯文本生成
                value:
                  model: doubao-seed-audio-1-0
                  prompt: 欢迎使用音频生成服务，今天天气真不错。
                  format: mp3
              with_voice:
                summary: 指定音色生成
                value:
                  model: doubao-seed-audio-1-0
                  prompt: 各位听众朋友，大家好，欢迎收听晚间新闻。
                  audio_references:
                    - zh_female_vv_uranus_bigtts
                  speech_rate: 1.25
              voice_clone:
                summary: 参考音频生成（音色复刻）
                value:
                  model: doubao-seed-audio-1-0
                  prompt: '@音频1 你好呀，很高兴认识你。'
                  audio_references:
                    - https://example.com/ref-voice.mp3
              multi_voice:
                summary: 多音色混合（音色 ID + 音频 URL）
                value:
                  model: doubao-seed-audio-1-0
                  prompt: '@音频1 你好呀，@音频2 今天过得怎么样？'
                  audio_references:
                    - zh_female_vv_uranus_bigtts
                    - https://example.com/ref-voice.mp3
              image_ref:
                summary: 参考图片生成
                value:
                  model: doubao-seed-audio-1-0
                  prompt: 用画面里的氛围合成一段旁白。
                  image_urls:
                    - https://example.com/scene.jpg
      responses:
        '200':
          description: 音频生成任务创建成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedAudioResponse'
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: missing_text
                  message: 'Missing required parameter: prompt'
                  type: invalid_request_error
        '401':
          description: 未认证、Token无效或过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 配额不足、需要充值
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: 无权限访问
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: doubao-seed-audio-1-0'
                  type: invalid_request_error
        '429':
          description: 请求频率超限
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    SeedAudioRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: 模型名称
          enum:
            - doubao-seed-audio-1-0
          default: doubao-seed-audio-1-0
          example: doubao-seed-audio-1-0
        prompt:
          type: string
          description: >-
            用于合成音频的提示词或待合成文本


            **三种生成模式（按是否传入参考资源自动匹配）：**

            - **纯文本生成**：仅传 `prompt`，按提示词直接生成音频

            - **参考音频生成（音色复刻）**：配合 `audio_references`；用 `@音频N` 引用其中第 N 项（编号从 `1`
            开始，顺序与数组一致）

            - **参考图片生成**：配合 `image_urls`，`prompt` 仅需传入待合成文本


            > 音频参考（`audio_references`）与图片参考（`image_urls`）**互斥**，同一次请求只能选其一。


            **约束：**

            - 最大 `1500` 字符
          maxLength: 1500
          example: 欢迎使用音频生成服务，今天天气真不错。
        audio_references:
          type: array
          description: >-
            参考资源列表。每一项可以是**音色 ID**，也可以是**参考音频 URL**，两者可在同一数组内**混合使用**


            - **音色 ID**：填写预置音色的 `voice_type`，完整列表见 [Seed-Audio 1.0
            音色列表](/cn/api-manual/audio-series/doubao-seed-audio/doubao-seed-audio-1-0-voices)

            - **音频 URL**：上传一段参考音频做声音复刻

            - **与 `image_urls` 互斥**：参考音频与参考图片只能二选一，不能在同一请求中同时传入

            - 在 `prompt` 中用 `@音频N` 引用第 N 项（编号从 `1` 开始，顺序与数组一致）

            - 不传时由模型按 `prompt` 自由生成音色


            **数量限制：**

            - 整个数组**最多 `3` 个素材**（音色 ID 与音频 URL 合计）


            **音频 URL 约束：**

            - 每条参考音频时长 ≤ `30` 秒、大小 ≤ `10 MB`

            - 格式：`wav` / `mp3` / `pcm` / `ogg_opus`
          items:
            type: string
          maxItems: 3
          example:
            - zh_female_vv_uranus_bigtts
        image_urls:
          type: array
          description: |-
            参考图片 URL 列表，按画面氛围生成音频

            - 使用图片参考时，`prompt` 仅需传入待合成文本
            - **与 `audio_references` 互斥**：参考图片与参考音频只能二选一，不能在同一请求中同时传入

            **约束：**
            - 当前仅支持 `1` 张，大小 ≤ `10 MB`
            - 格式：`jpeg` / `png` / `webp`
          items:
            type: string
            format: uri
          maxItems: 1
          example:
            - https://example.com/scene.jpg
        format:
          type: string
          description: 输出音频格式
          enum:
            - wav
            - mp3
            - pcm
            - ogg_opus
          default: wav
          example: mp3
        sample_rate:
          type: integer
          description: 输出采样率（Hz）
          enum:
            - 8000
            - 16000
            - 24000
            - 32000
            - 44100
            - 48000
          default: 24000
          example: 24000
        speech_rate:
          type: number
          description: |-
            语速倍数（支持两位小数）

            - `1.0`：正常语速（默认）
            - `2.0`：两倍速；`0.5`：半速

            取值范围 `0.5` ~ `2.0`
          minimum: 0.5
          maximum: 2
          multipleOf: 0.01
          default: 1
          example: 1.25
        loudness_rate:
          type: number
          description: |-
            音量倍数（支持两位小数）

            - `1.0`：正常音量（默认）
            - `2.0`：两倍音量；`0.5`：半音量

            取值范围 `0.5` ~ `2.0`
          minimum: 0.5
          maximum: 2
          multipleOf: 0.01
          default: 1
          example: 0.85
        pitch_rate:
          type: integer
          description: |-
            音调调节，单位为**半音**

            - `0`：默认音调（不调整）
            - **正值升高音调**：数值越大声音越高、越尖锐，`12` 为升高一个八度
            - **负值降低音调**：数值越小声音越低、越浑厚，`-12` 为降低一个八度

            取值范围 `-12` ~ `12`
          minimum: -12
          maximum: 12
          default: 0
          example: 0
        callback_url:
          type: string
          description: |-
            任务完成后的HTTPS回调地址

            **回调时机：**
            - 任务完成（completed）、失败（failed）或取消（cancelled）时触发
            - 在计费确认完成后发送

            **安全限制：**
            - 仅支持HTTPS协议
            - 禁止回调到内网IP地址（127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x等）
            - URL长度不超过`2048`字符

            **回调机制：**
            - 超时时间：`10`秒
            - 失败后最多重试`3`次（会分别在失败的`1`秒/`2`秒/`4`秒后进行重试）
            - 回调响应体格式与任务查询接口返回的格式一致
            - 回调地址若返回2xx状态码视为成功，其他状态码会触发重试
          format: uri
          example: https://your-domain.com/webhooks/audio-completed
    SeedAudioResponse:
      type: object
      properties:
        created:
          type: integer
          description: 任务创建时间戳
          example: 1775200000
        id:
          type: string
          description: 任务ID
          example: task-unified-1775200000-abcd1234
        model:
          type: string
          description: 实际使用的模型名称
          example: doubao-seed-audio-1-0
        object:
          type: string
          enum:
            - audio.generation.task
          description: 任务的具体类型
        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:
          $ref: '#/components/schemas/AudioTaskInfo'
          description: 音频任务详细信息
        type:
          type: string
          enum:
            - audio
          description: 任务的输出类型
          example: audio
        usage:
          $ref: '#/components/schemas/AudioUsage'
          description: 使用量和计费信息
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 错误代码标识符
            message:
              type: string
              description: 错误描述信息
            type:
              type: string
              description: 错误类型
    AudioTaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: 任务是否可以取消
          example: true
        estimated_time:
          type: integer
          description: 预估完成时间(秒)
          minimum: 0
          example: 15
        audio_type:
          type: string
          description: 音频任务类型
          example: audio_generation
    AudioUsage:
      type: object
      description: 使用量信息
      properties:
        credits_reserved:
          type: number
          description: 预估消耗积分数（按时长上限预扣，任务完成后按实际时长结算）
          minimum: 0
          example: 9.6
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````