POST /v2/cover/generate
Generate AI cover images for your music tracks. Consumes 1 credit per request.
ヒント
How it works:
- Step 1: Call
/v2/cover/generatewith your music task ID to start cover generation - Step 2: Use the returned
taskIdto poll/v2/cover/statusfor results - Step 3: When status is
SUCCESS, get the generated cover images fromimagesarray
Credit Cost: 1 credit per cover generation request.
Important Notes:
- Cover image file URLs will be retained for 14 days
- Each music task can only generate a Cover once; duplicate requests will return a 400 error
- It's recommended to call this interface after music generation is complete
- Usually generates 2 different style images for selection
リクエストヘッダー
| 名前 | 必須 | 説明 |
|---|---|---|
| Authorization | はい | Bearer token for authentication (your API key) |
| Content-Type | はい | application/json |
Bearer token for authentication (your API key)
application/json
リクエストボディ
Request body for generating music cover
共通パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| taskId | string | はい | The task ID of the original music generation. This is the workId returned from the /v2/generate endpoint. | gen123213213213123bksv |
レスポンス
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cover123123213213b880d2"
}
}コード例
curl -X POST "https://udioapi.pro/api/v2/cover/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskId": "gen123213213213123bksv"
}'GET /v2/cover/status
Check the status of a cover generation task and retrieve generated cover images.
リクエストパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| task_id | string | はい | The cover task ID returned from /v2/cover/generate |
The cover task ID returned from /v2/cover/generate
リクエストヘッダー
| 名前 | 必須 | 説明 |
|---|---|---|
| Authorization | はい | Bearer token for authentication (your API key) |
Bearer token for authentication (your API key)
レスポンス
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cover123123213213b880d2",
"status": "SUCCESS",
"images": [
"https://tempcover.storage.com/s/123.png",
"https://tempcover.storage.com/s/456.png"
],
"created_at": "2026-01-01 00:00:30"
}
}コード例
curl -X GET "https://udioapi.pro/api/v2/cover/status?task_id=cover123123213213b880d2" \
-H "Authorization: Bearer YOUR_API_KEY"POST /v2/cover/generate
Generate AI cover images for your music tracks. Consumes 1 credit per request.
ヒント
How it works:
- Step 1: Call
/v2/cover/generatewith your music task ID to start cover generation - Step 2: Use the returned
taskIdto poll/v2/cover/statusfor results - Step 3: When status is
SUCCESS, get the generated cover images fromimagesarray
Credit Cost: 1 credit per cover generation request.
Important Notes:
- Cover image file URLs will be retained for 14 days
- Each music task can only generate a Cover once; duplicate requests will return a 400 error
- It's recommended to call this interface after music generation is complete
- Usually generates 2 different style images for selection
リクエストヘッダー
| 名前 | 必須 | 説明 |
|---|---|---|
| Authorization | はい | Bearer token for authentication (your API key) |
| Content-Type | はい | application/json |
Bearer token for authentication (your API key)
application/json
リクエストボディ
Request body for generating music cover
共通パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| taskId | string | はい | The task ID of the original music generation. This is the workId returned from the /v2/generate endpoint. | gen123213213213123bksv |
レスポンス
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cover123123213213b880d2"
}
}コード例
curl -X POST "https://udioapi.pro/api/v2/cover/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskId": "gen123213213213123bksv"
}'GET /v2/cover/status
Check the status of a cover generation task and retrieve generated cover images.
リクエストパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| task_id | string | はい | The cover task ID returned from /v2/cover/generate |
The cover task ID returned from /v2/cover/generate
リクエストヘッダー
| 名前 | 必須 | 説明 |
|---|---|---|
| Authorization | はい | Bearer token for authentication (your API key) |
Bearer token for authentication (your API key)
レスポンス
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cover123123213213b880d2",
"status": "SUCCESS",
"images": [
"https://tempcover.storage.com/s/123.png",
"https://tempcover.storage.com/s/456.png"
],
"created_at": "2026-01-01 00:00:30"
}
}コード例
curl -X GET "https://udioapi.pro/api/v2/cover/status?task_id=cover123123213213b880d2" \
-H "Authorization: Bearer YOUR_API_KEY"