POST
/v2/cover/generatePOST /v2/cover/generate
Generate AI cover images for your music tracks. Consumes 1 credit per request.
POST
https://udioapi.pro/api/v2/cover/generateヒント
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 |
リクエストボディ
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 |
レスポンス
json
{
"code": 200,
"msg": "success",
"data": {
"taskId": "cover123123213213b880d2"
}
}コード例
curl
curl -X POST "https://udioapi.pro/api/v2/cover/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"taskId": "gen123213213213123bksv"
}'