Music GenerationtaskType: cover_suno0 Credits (Free)

Generate Music Cover

Generate personalized cover images (album art) based on an existing music generation task. Produces 2 distinct high-quality visual art covers tailored to your track.

POST/api/v1/createTask

Usage Guide & Overview

  • Use this interface to create personalized cover images for generated music tracks.
  • Requires the task_id of the original music generation task.
  • Each music task can only generate a Cover once; duplicate requests will return the existing task_id.
  • Results will be notified through the callBackUrl webhook URL upon completion.
  • Cover image file URLs will be retained for 14 days.
  • It is recommended to call this interface after music generation is complete.
  • Usually generates 2 different style images for your selection.

Supported AI Models

Official Cover Model
ai-music-api/cover-generate
DEFAULT

Specialized neural image generation model fine-tuned for music album cover art, extracting audio mood and style cues from the original track.

Authentication & Headers

HeaderRequirementDescription
Authorizationrequired

Bearer YOUR_API_KEY

Secret API Key obtained from dashboard

Content-Typerequired

application/json

Request payload format

Request Body Schema

3 fields
task_idstringrequired

Unique identifier (task_id) of the original music generation task for which the cover art is being created.

modelstringoptional
default:ai-music-api/cover-generate

Cover generation model name. Default: "ai-music-api/cover-generate".

callBackUrlstringoptional

Public Webhook URL to receive asynchronous completion notifications when cover image generation is finished.

When Callbacks Are Sent

The SongMesh API automatically triggers an HTTP POST request to your designated callBackUrl under these events:

  • Cover generation task completed successfully (code: 200)
  • Cover generation task failed (code: 501)
  • Error occurred during task processing or parameter validation (code: 400, 500, 531)

Webhook Payload Format

Response Body(200 status)
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "21aee3c3c2a01fa5e030b3799fa4dd56",
    "images": [
      "https://tempfile.aiquickdraw.com/s/1753958521_6c1b3015141849d1a9bf17b738ce9347.png",
      "https://tempfile.aiquickdraw.com/s/1753958524_c153143acc6340908431cf0e90cbce9e.png"
    ]
  }
}

Callback Payload Fields

FieldTypeDescription
codeintegerCallback status code (200: Success, 400: Invalid params, 408: Timeout, 500: Server error, 501: Generation failed, 531: Failed & credits refunded)
msgstringStatus message providing detailed execution state or error cause
data.taskIdstringTask ID, consistent with the taskId returned when submitting the cover task
data.imagesarrayArray of generated cover image URLs (usually 2 different style images; retained for 14 days)

Receiver Implementation Example

Webhook Receiver
// Next.js App Router Webhook Receiver (/api/webhook/suno/route.ts)
import { NextRequest, NextResponse } from 'next/server';

export async function POST(req: NextRequest) {
  const payload = await req.json();
  const { code, msg, data } = payload;

  if (code === 200 && data) {
    const { taskId, images } = data;
    console.log(`Cover task ${taskId} finished with ${images?.length} cover images:`, images);
    // Save generated cover images to your database...
  } else {
    console.error(`Cover generation failed (${code}): ${msg}`);
  }

  return NextResponse.json({ received: true });
}

Webhook Security Recommendation

Always verify incoming webhook payloads on your server. Respond with a 200 OK immediately after parsing the payload to prevent redundant delivery retries from the webhook dispatcher.

Request Sample
curl -X POST "https://api.sunoapi.top/api/v1/createTask" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "cover_suno",
    "task_id": "73d6128b3523a0079df10da9471017c8",
    "callBackUrl": "https://api.yourdomain.com/webhook/suno"
  }'
Response Body(200 status)
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "21aee3c3c2a01fa5e030b3799fa4dd56"
  }
}

Ready to integrate Generate Music Cover?

Create your free account, obtain your API key, and start creating album art seamlessly.

Generate Secret Key