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

# 建立音樂或聲音生成任務

> 音樂與聲音生成提交介面，相容舊 `/suno/submit/music` 路徑。返回任務 ID，後續透過 `/suno/fetch/{task_id}` 查詢。

音樂與聲音生成任務提交介面。路徑保持 `/suno/submit/music`，實際可透過 `upstream_model`、`music_model`、`engine`、`model_id` 或 `modelId` 選擇生成引擎。建立介面返回 `task_id`，隨後用 `/suno/fetch/{task_id}` 查詢輸出。

未傳 `upstream_model`（或只傳 `{"model":"suno_music"}`）時，預設使用 Suno v5.5。需要繼續使用舊版 Suno 時，請明確傳入 `"upstream_model":"suno-v5"`。

## 新增模型

| 類型 | `upstream_model` / 別名 | `modelId` |
| --- | --- | ---: |
| 音樂 | `suno-v5.5` / `chirp-fenix` | 128 |
| 聲音 | `seed-audio-1.0` | 126 |
| 聲音 | `minimax-speech-2.8-hd` / `speech-2.8-hd` | 127 |
| 音樂 | `lyria-3-pro` / `lyria-3-pro-preview` | 129 |

## 提示詞描述模式

適合只描述風格、情緒、語言、歌手類型和場景，由模型自動生成歌曲內容。

```json
{
  "model": "suno_music",
  "upstream_model": "suno-v5.5",
  "prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
  "make_instrumental": false
}
```

## 聲音生成

MiniMax Speech 可透過 `extraParams`（或頂層同名 snake_case/camelCase 欄位）覆蓋語音參數。

```json
{
  "model": "suno_music",
  "upstream_model": "minimax-speech-2.8-hd",
  "prompt": "欢迎使用新版语音生成服务。",
  "extraParams": {
    "voice": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
    "outputFormat": "mp3",
    "sampleRate": 32000,
    "speed": 1,
    "volume": 1,
    "pitch": 0
  }
}
```

MiniMax Speech 未傳語音參數時，服務端預設發送上例中的 `voice`、`outputFormat=mp3`、`sampleRate=32000`、`speed=1`、`volume=1` 和 `pitch=0`。

Lyria 3 Pro 使用 `upstream_model=lyria-3-pro`（或 `lyria-3-pro-preview`）：

```json
{
  "model": "suno_music",
  "upstream_model": "lyria-3-pro",
  "prompt": "Cinematic orchestral music with a hopeful finale."
}
```

## 輕音樂或純伴奏

可使用 `light_music=true` 或 `make_instrumental=true`。`light_music` 表示偏輕音樂/背景音樂，`make_instrumental` 表示不生成演唱人聲。

```json
{
  "model": "suno_music",
  "upstream_model": "minimax-music-v2.6",
  "prompt": "Warm cafe background music with soft piano and strings, relaxing and cinematic.",
  "light_music": true,
  "make_instrumental": true
}
```

## 歌詞高級模式

適合業務側已經準備好歌詞，需要指定標題和風格標籤。可傳 `custom_mode=true`，歌詞欄位可用 `lyrics`、`lyric`、`custom_lyrics` 或 `customLyrics`。

```json
{
  "model": "suno_music",
  "upstream_model": "mureka-v9",
  "custom_mode": true,
  "title": "Summer Sea Breeze",
  "tags": "electro pop, female vocal, bright summer",
  "lyrics": "[Verse]\nSea breeze moves across the white sand\n[Chorus]\nTurn the summer into a beam of light"
}
```

## 查詢

建立成功後保存回傳的 `data` 任務 ID，例如 `task_xxx`，呼叫 `GET /suno/fetch/{task_id}` 查詢狀態、音訊位址、封面、標題、歌詞和上游回傳的原始片段資訊。



## OpenAPI

````yaml api-reference/zh-tw/openapi.json POST /suno/submit/music
openapi: 3.0.0
info:
  title: 出海營 API 參考文件
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI格式（Chat）
  - name: OpenAI格式（Responses）
  - name: 圖片生成 Gemini 格式
  - name: 圖片生成OpenAI DALL-E 格式
  - name: 獲取模型列表
  - name: 影片生成HappyHorse與 Wan
  - name: 影片生成Kling格式
  - name: 影片生成 Omni 與 Veo 格式
  - name: 影片生成 Seedance 格式
  - name: 影片生成Sora相容格式
  - name: 影片生成 Vidu 格式
  - name: 音樂生成任務格式
paths:
  /suno/submit/music:
    post:
      tags:
        - 音樂生成任務格式
      summary: 建立音樂或聲音生成任務
      description: >-
        音樂與聲音生成提交介面，相容舊 `/suno/submit/music` 路徑。返回任務 ID，後續透過
        `/suno/fetch/{task_id}` 查詢。


        音樂與聲音生成任務提交介面。路徑保持 `/suno/submit/music`，實際可透過
        `upstream_model`、`music_model`、`engine`、`model_id` 或 `modelId`
        選擇生成引擎。建立介面返回 `task_id`，隨後用 `/suno/fetch/{task_id}` 查詢輸出。


        未傳 `upstream_model`（或只傳 `{"model":"suno_music"}`）時，預設使用 Suno
        v5.5。需要繼續使用舊版 Suno 時，請明確傳入 `"upstream_model":"suno-v5"`。


        ## 新增模型


        | 類型 | `upstream_model` / 別名 | `modelId` |

        | --- | --- | ---: |

        | 音樂 | `suno-v5.5` / `chirp-fenix` | 128 |

        | 聲音 | `seed-audio-1.0` | 126 |

        | 聲音 | `minimax-speech-2.8-hd` / `speech-2.8-hd` | 127 |

        | 音樂 | `lyria-3-pro` / `lyria-3-pro-preview` | 129 |


        ## 提示詞描述模式


        適合只描述風格、情緒、語言、歌手類型和場景，由模型自動生成歌曲內容。


        ```json

        {
          "model": "suno_music",
          "upstream_model": "suno-v5.5",
          "prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
          "make_instrumental": false
        }

        ```


        ## 聲音生成


        MiniMax Speech 可透過 `extraParams`（或頂層同名 snake_case/camelCase 欄位）覆蓋語音參數。


        ```json

        {
          "model": "suno_music",
          "upstream_model": "minimax-speech-2.8-hd",
          "prompt": "欢迎使用新版语音生成服务。",
          "extraParams": {
            "voice": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
            "outputFormat": "mp3",
            "sampleRate": 32000,
            "speed": 1,
            "volume": 1,
            "pitch": 0
          }
        }

        ```


        MiniMax Speech 未傳語音參數時，服務端預設發送上例中的
        `voice`、`outputFormat=mp3`、`sampleRate=32000`、`speed=1`、`volume=1` 和
        `pitch=0`。


        Lyria 3 Pro 使用 `upstream_model=lyria-3-pro`（或 `lyria-3-pro-preview`）：


        ```json

        {
          "model": "suno_music",
          "upstream_model": "lyria-3-pro",
          "prompt": "Cinematic orchestral music with a hopeful finale."
        }

        ```


        ## 輕音樂或純伴奏


        可使用 `light_music=true` 或 `make_instrumental=true`。`light_music`
        表示偏輕音樂/背景音樂，`make_instrumental` 表示不生成演唱人聲。


        ```json

        {
          "model": "suno_music",
          "upstream_model": "minimax-music-v2.6",
          "prompt": "Warm cafe background music with soft piano and strings, relaxing and cinematic.",
          "light_music": true,
          "make_instrumental": true
        }

        ```


        ## 歌詞高級模式


        適合業務側已經準備好歌詞，需要指定標題和風格標籤。可傳 `custom_mode=true`，歌詞欄位可用
        `lyrics`、`lyric`、`custom_lyrics` 或 `customLyrics`。


        ```json

        {
          "model": "suno_music",
          "upstream_model": "mureka-v9",
          "custom_mode": true,
          "title": "Summer Sea Breeze",
          "tags": "electro pop, female vocal, bright summer",
          "lyrics": "[Verse]\nSea breeze moves across the white sand\n[Chorus]\nTurn the summer into a beam of light"
        }

        ```


        ## 查詢


        建立成功後保存回傳的 `data` 任務 ID，例如 `task_xxx`，呼叫 `GET /suno/fetch/{task_id}`
        查詢狀態、音訊位址、封面、標題、歌詞和上游回傳的原始片段資訊。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  example: suno_music
                  description: 固定傳 `suno_music`。
                  enum:
                    - suno_music
                upstream_model:
                  type: string
                  example: suno-v5.5
                  description: 生成引擎選擇值；預設為 `suno-v5.5`，顯式傳入 `suno-v5` 可保留舊版。
                music_model:
                  type: string
                  description: '`upstream_model` 的相容別名。'
                engine:
                  type: string
                  description: '`upstream_model` 的相容別名。'
                model_id:
                  oneOf:
                    - type: string
                    - type: integer
                  description: '`model_id` 的 camelCase 相容欄位。'
                modelId:
                  oneOf:
                    - type: string
                    - type: integer
                  description: '`model_id` 的 camelCase 相容欄位。'
                prompt:
                  type: string
                  description: 在提示詞描述模式下，作為音樂風格、情緒和場景；在歌詞高級模式下，可作為歌詞相容欄位。
                gpt_description_prompt:
                  type: string
                  description: 描述模式提示詞相容欄位。
                extraParams:
                  type: object
                  description: >-
                    MiniMax Speech 2.8 HD 的語音參數；是 `extraParams` 的 snake_case
                    相容欄位。
                  properties:
                    voice:
                      type: string
                      default: moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85
                    outputFormat:
                      type: string
                      default: mp3
                    sampleRate:
                      type: integer
                      default: 32000
                    speed:
                      type: number
                      default: 1
                    volume:
                      type: number
                      default: 1
                    pitch:
                      type: number
                      default: 0
                  additionalProperties: true
                extra_params:
                  type: object
                  description: >-
                    MiniMax Speech 2.8 HD 的語音參數；是 `extraParams` 的 snake_case
                    相容欄位。
                  properties:
                    voice:
                      type: string
                      default: moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85
                    outputFormat:
                      type: string
                      default: mp3
                    sampleRate:
                      type: integer
                      default: 32000
                    speed:
                      type: number
                      default: 1
                    volume:
                      type: number
                      default: 1
                    pitch:
                      type: number
                      default: 0
                  additionalProperties: true
                voice:
                  type: string
                  description: MiniMax Speech 2.8 HD 音色，可覆蓋 `extraParams.voice`。
                output_format:
                  type: string
                  description: MiniMax Speech 2.8 HD 輸出格式。
                outputFormat:
                  type: string
                  description: '`output_format` 的 camelCase 相容欄位。'
                sample_rate:
                  type: integer
                  description: MiniMax Speech 2.8 HD 取樣率。
                sampleRate:
                  type: integer
                  description: '`sample_rate` 的 camelCase 相容欄位。'
                speed:
                  type: number
                  description: 語速，預設 1。
                volume:
                  type: number
                  description: 音量，預設為 1。
                pitch:
                  type: number
                  description: 音調，預設為 0。
                make_instrumental:
                  type: boolean
                  default: false
                  description: 是否生成純伴奏。
                light_music:
                  type: boolean
                  description: 是否依輕音樂／背景音樂方向生成。
                pure_music:
                  type: boolean
                  description: 是否按純音樂方向生成。
                custom_mode:
                  type: boolean
                  description: 是否使用自訂模式。
                customMode:
                  type: boolean
                  description: '`custom_mode` 的 camelCase 相容欄位。'
                title:
                  type: string
                  description: 歌曲標題。
                tags:
                  type: string
                  description: 風格標籤，例如 `electro pop, female vocal`。
                style:
                  type: string
                  description: 風格相容欄位。
                genre:
                  type: string
                  description: 曲風相容欄位。
                genres:
                  type: string
                  description: 曲風相容欄位。
                lyrics:
                  type: string
                  description: 歌詞內容。
                lyric:
                  type: string
                  description: '`lyrics` 相容別名。'
                custom_lyrics:
                  type: string
                  description: '`lyrics` 相容別名。'
                customLyrics:
                  type: string
                  description: '`lyrics` 相容別名。'
            examples:
              music_submit_prompt:
                summary: Suno v5.5 音樂生成
                value:
                  model: suno_music
                  upstream_model: suno-v5.5
                  prompt: >-
                    Imitating "Billie Jean," create a DJ song with the theme of
                    "the artificial intelligence revolution."
                  make_instrumental: false
              music_submit_lyria:
                summary: Lyria 3 Pro 音樂生成
                value:
                  model: suno_music
                  upstream_model: lyria-3-pro
                  prompt: Cinematic orchestral music with a hopeful finale.
              audio_submit_seed:
                summary: Seed Audio 1.0 聲音生成
                value:
                  model: suno_music
                  upstream_model: seed-audio-1.0
                  prompt: 清晨海边的浪声与远处海鸥声。
              audio_submit_minimax_speech:
                summary: MiniMax Speech 2.8 HD
                value:
                  model: suno_music
                  upstream_model: minimax-speech-2.8-hd
                  prompt: 欢迎使用新版语音生成服务。
                  extraParams:
                    voice: moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85
                    outputFormat: mp3
                    sampleRate: 32000
                    speed: 1
                    volume: 1
                    pitch: 0
              music_submit_light:
                summary: 輕音樂生成
                value:
                  model: suno_music
                  upstream_model: minimax-music-v2.6
                  prompt: >-
                    Warm cafe background music with soft piano and strings,
                    relaxing and cinematic.
                  light_music: true
                  make_instrumental: true
              music_submit_lyrics:
                summary: 歌詞進階模式
                value:
                  model: suno_music
                  upstream_model: mureka-v9
                  custom_mode: true
                  title: Summer Sea Breeze
                  tags: electro pop, female vocal, bright summer
                  lyrics: |-
                    [Verse]
                    Sea breeze moves across the white sand
                    [Chorus]
                    Turn the summer into a beam of light
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: success
                    description: 成功時為 `success`。
                  message:
                    type: string
                    description: 錯誤或提示資訊。
                  data:
                    type: object
                    description: 任務 ID，用於後續查詢。
              examples:
                music_submit_success:
                  summary: 音樂生成提交成功
                  value:
                    code: success
                    message: ''
                    data: task_xxx
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 認證。
        格式: `Authorization: Bearer sk-xxxxxx`

````