> ## 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`：成功後に利用可能な結果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/ja/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: Video generation Seedance
  - name: 動画生成Sora対応形式
  - name: Video generation 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`：成功後に利用可能な結果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`

````