> ## 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.

# 按 ID 查询音乐任务

> 通过 path `task_id` 查询音乐生成任务。

音乐生成任务查询接口。创建接口返回的 `data` 即任务 ID，通过 `GET /suno/fetch/{task_id}` 查询单个任务。

## 查询方式

```http
GET /suno/fetch/task_xxx
```

## 查询输出

外层保持 new-api 任务结构：

- `code`：成功时为 `success`。
- `message`：错误或提示信息。
- `data.task_id`：任务 ID。
- `data.status`：任务状态，常见值 `NOT_START`、`SUBMITTED`、`QUEUED`、`IN_PROGRESS`、`SUCCESS`、`FAILURE`。
- `data.progress`：任务进度。
- `data.result_url`：成功后可用的结果地址，若上游返回多首歌曲，以 `data.data` 内片段为准。
- `data.data`：上游音乐结果原始数据，通常包含歌曲片段数组或对象。

成功态示例：

```json
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "task_xxx",
    "platform": "suno",
    "action": "MUSIC",
    "status": "SUCCESS",
    "progress": "100%",
    "result_url": "https://example.com/audio.mp3",
    "properties": {
      "upstream_model_name": "suno_music",
      "origin_model_name": "suno-v5.5"
    },
    "data": [
      {
        "id": "clip_xxx",
        "title": "夏日海风",
        "audio_url": "https://example.com/audio.mp3",
        "image_url": "https://example.com/cover.jpg",
        "model_name": "suno-v5.5",
        "metadata": {
          "duration": 180,
          "prompt": "轻快电子流行，夏日海边，女声 旋律"
        }
      }
    ]
  }
}
```



## OpenAPI

````yaml api-reference/cn/openapi.json GET /suno/fetch/{task_id}
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/fetch/{task_id}:
    get:
      tags:
        - 音乐生成任务格式
      summary: 按 ID 查询音乐任务
      description: >-
        通过 path `task_id` 查询音乐生成任务。


        音乐生成任务查询接口。创建接口返回的 `data` 即任务 ID，通过 `GET /suno/fetch/{task_id}` 查询单个任务。


        ## 查询方式


        ```http

        GET /suno/fetch/task_xxx

        ```


        ## 查询输出


        外层保持 new-api 任务结构：


        - `code`：成功时为 `success`。

        - `message`：错误或提示信息。

        - `data.task_id`：任务 ID。

        - `data.status`：任务状态，常见值
        `NOT_START`、`SUBMITTED`、`QUEUED`、`IN_PROGRESS`、`SUCCESS`、`FAILURE`。

        - `data.progress`：任务进度。

        - `data.result_url`：成功后可用的结果地址，若上游返回多首歌曲，以 `data.data` 内片段为准。

        - `data.data`：上游音乐结果原始数据，通常包含歌曲片段数组或对象。


        成功态示例：


        ```json

        {
          "code": "success",
          "message": "",
          "data": {
            "task_id": "task_xxx",
            "platform": "suno",
            "action": "MUSIC",
            "status": "SUCCESS",
            "progress": "100%",
            "result_url": "https://example.com/audio.mp3",
            "properties": {
              "upstream_model_name": "suno_music",
              "origin_model_name": "suno-v5.5"
            },
            "data": [
              {
                "id": "clip_xxx",
                "title": "夏日海风",
                "audio_url": "https://example.com/audio.mp3",
                "image_url": "https://example.com/cover.jpg",
                "model_name": "suno-v5.5",
                "metadata": {
                  "duration": 180,
                  "prompt": "轻快电子流行，夏日海边，女声 旋律"
                }
              }
            ]
          }
        }

        ```
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            example: task_xxx
          description: 提交音乐任务返回的任务 ID。
      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
                    properties:
                      task_id:
                        type: string
                        description: 任务 ID。
                      status:
                        type: string
                        description: >-
                          任务状态，常见值
                          `NOT_START`、`SUBMITTED`、`QUEUED`、`IN_PROGRESS`、`SUCCESS`、`FAILURE`。
                      progress:
                        type: string
                        description: 任务进度。
                      result_url:
                        type: string
                        description: 成功后可用的结果地址。
                      data:
                        type: string
                        items:
                          type: object
                          properties:
                            audio_url:
                              type: string
                              description: 歌曲音频 URL。
                            image_url:
                              type: string
                              description: 歌曲封面 URL。
                            title:
                              type: string
                              description: 歌曲标题。
                            metadata:
                              type: object
                              properties:
                                duration:
                                  type: string
                                  description: 音频时长。
              examples:
                music_fetch_success:
                  summary: 音乐任务查询成功
                  value:
                    code: success
                    message: ''
                    data:
                      task_id: task_xxx
                      platform: suno
                      action: MUSIC
                      status: SUCCESS
                      progress: 100%
                      result_url: https://example.com/audio.mp3
                      properties:
                        upstream_model_name: suno_music
                        origin_model_name: suno-v5.5
                      data:
                        - id: clip_xxx
                          title: 夏日海风
                          audio_url: https://example.com/audio.mp3
                          image_url: https://example.com/cover.jpg
                          model_name: suno-v5.5
                          metadata:
                            duration: 180
                            prompt: 轻快电子流行，夏日海边，女声 旋律
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````