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

# Suno 查询

> GET /suno/fetch/{id} —— 轮询 Suno 任务状态

获取 Suno 音乐生成任务的当前状态与结果。

## 请求

```bash theme={null}
curl https://openp.ai/suno/fetch/task_01... \
  -H "Authorization: Bearer $OPENPAI_API_KEY"
```

## 响应

```json theme={null}
{
  "code": "success",
  "data": {
    "task_id": "task_01...",
    "status": "SUCCESS",
    "progress": 100,
    "clips": [
      {
        "id": "clip_a",
        "title": "Rainy Night",
        "audio_url": "https://...mp3",
        "video_url": "https://...mp4",
        "image_url": "https://...png",
        "duration": 180,
        "lyric": "...",
        "tags": "lofi, hiphop",
        "model_name": "chirp-v4"
      },
      {
        "id": "clip_b",
        "title": "Rainy Night",
        "audio_url": "https://...mp3",
        "duration": 175
      }
    ]
  }
}
```

### status

| 值                 | 含义           |
| ----------------- | ------------ |
| `PENDING`         | 队列中          |
| `TEXT_GENERATING` | 生成歌词         |
| `FIRST_SUCCESS`   | 首段已就绪(可流式播放) |
| `STREAMING`       | 流式生成中        |
| `SUCCESS`         | 全部完成         |
| `FAILURE`         | 失败           |

## 批量查询

```bash theme={null}
curl -X POST https://openp.ai/suno/fetch \
  -H "Authorization: Bearer $OPENPAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["task_01","task_02"]}'
```

## 注意

* `audio_url` / `video_url` 等链接通常仅在 **24-48 小时** 内可访问,请及时下载到自有存储。
* 任务一般 1-3 分钟内完成,长曲目(continue)可能更久。
* 失败任务建议先看 `failure_reason`,常见原因:上游过载、上游拒绝、歌词太长。
