Skip to main content
POST
/
api
/
v1
/
suno
/
cover
/
generate
Generate Music Cover
curl --request POST \
  --url https://api.sunoapi.org/api/v1/suno/cover/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "taskId": "73d6128b3523a0079df10da9471017c8",
  "callBackUrl": "https://api.example.com/callback"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "21aee3c3c2a01fa5e030b3799fa4dd56"
  }
}
Create personalized cover images for generated music. This endpoint analyzes your music generation task and creates custom album artwork that visually represents your music’s style, mood, and content.

Cover Generation Process

Transform your music into visual art:

Step 1: Music Analysis

  • Style Detection: AI analyzes the musical genre and characteristics
  • Mood Recognition: Identifies emotional tone and atmosphere
  • Theme Extraction: Pulls visual themes from lyrics and style tags

Step 2: Visual Creation

  • Art Generation: Creates unique artwork matching your music’s vibe
  • Style Matching: Visual elements complement the audio style
  • Professional Quality: High-resolution images suitable for distribution

Step 3: Delivery

  • Callback Notification: Receive completion updates via your callback URL
  • Image Access: Get direct links to generated cover images
  • Multiple Formats: Covers optimized for different use cases

Required Parameters

Both parameters are mandatory for cover generation:

Task ID

  • Source Reference: Must be the exact taskId from your music generation request
  • Validation: System verifies the task exists and is completed
  • One-Time Use: Each task can only generate one cover to prevent duplicates

Callback URL

  • Completion Notification: Receive updates when cover generation finishes
  • Result Delivery: Get direct access to generated cover image URLs
  • Status Updates: Monitor generation progress through callback events

Response Handling

Success Response

  • New Task ID: Unique identifier for the cover generation task
  • Status: Confirmation that generation has started
  • Tracking: Use the returned task ID to monitor progress

Error Scenarios

Common error codes and their meanings:
  • 400: Cover already exists for this music task
  • 401: Invalid or missing authentication credentials
  • 402: Insufficient account credits for cover generation
  • 404: Original music task not found
  • 409: Cover generation conflict (duplicate request)
  • 422: Invalid parameters or validation failure
  • 429: Rate limit exceeded - too many requests
  • 455: Service temporarily unavailable
  • 500: Internal server error during processing

Integration Examples

Basic Cover Generation

async function generateCover(musicTaskId) {
  try {
    const response = await fetch('/api/v1/suno/cover/generate', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        taskId: musicTaskId,
        callBackUrl: 'https://yoursite.com/cover-callback'
      })
    });

    const result = await response.json();
    console.log('Cover generation started:', result.data.taskId);

  } catch (error) {
    console.error('Cover generation failed:', error);
  }
}

Callback Handler

app.post('/cover-callback', (req, res) => {
  const { code, data } = req.body;

  if (code === 200) {
    console.log('Cover completed:', data.coverImageUrl);
    // Update your database with the cover image URL
    updateMusicRecord(data.taskId, data.coverImageUrl);
  } else {
    console.error('Cover generation failed:', data.errorMessage);
  }

  res.status(200).json({ received: true });
});

Use Cases

Music Distribution

  • Streaming Platforms: Create covers for Spotify, Apple Music releases
  • Digital Sales: Professional artwork for iTunes, Bandcamp
  • Social Media: Eye-catching visuals for music promotion

Content Creation

  • YouTube Videos: Thumbnail images for music videos
  • Podcast Episodes: Episode artwork for music-focused content
  • Blog Posts: Visual elements for music reviews and articles

Professional Applications

  • Record Labels: Consistent artwork for catalog releases
  • Music Libraries: Visual organization for large music collections
  • Event Promotion: Cover art for concert and festival marketing

Best Practices

Timing

  • Wait for Completion: Only generate covers after music generation succeeds
  • Avoid Duplicates: Don’t request multiple covers for the same task
  • Batch Processing: Generate covers for multiple tracks in sequence

Quality Optimization

  • Detailed Music Descriptions: Better music metadata creates better covers
  • Clear Style Tags: Specific genres and moods improve visual matching
  • Professional Titles: Clean track titles enhance text integration

Error Recovery

  • Retry Logic: Implement backoff for temporary failures
  • Status Monitoring: Use callback URLs for reliable status updates
  • Fallback Options: Have default covers ready for generation failures
Transform your AI-generated music into complete artistic packages with custom cover art that perfectly captures your musical vision!

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json
taskId
string
required

Original music task ID, should be the taskId returned by the music generation interface.

Example:

"73d6128b3523a0079df10da9471017c8"

callBackUrl
string<uri>
required

URL address for receiving Cover generation task completion updates. This parameter is required for all Cover generation requests. The system will send POST requests to this URL when Cover generation is complete, including task status and results. Your callback endpoint should be able to accept JSON payloads containing cover image URLs. For detailed callback format and implementation guide, see Cover Generation Callbacks. Alternatively, you can use the Get Cover Details interface to poll task status.

Example:

"https://api.example.com/callback"

Response

Success

code
enum<integer>

Response status code. 200: Success - Request processed successfully, 400: Validation error - Cover already generated for this task, 401: Unauthorized - Authentication credentials missing or invalid, 402: Insufficient credits - Account doesn't have enough credits for this operation, 404: Not found - Requested resource or endpoint doesn't exist, 409: Conflict - Cover record already exists, 422: Validation error - Request parameters failed validation checks, 429: Rate limited - Your call frequency is too high. Please try again later, 455: Service unavailable - System currently undergoing maintenance, 500: Server error - Unexpected error occurred while processing request

Available options:
200,
400,
401,
402,
404,
409,
422,
429,
455,
500
Example:

200

msg
string

Status message. Error message when code != 200

Example:

"success"

data
object