Skip to main content
POST
/
api
/
v1
/
wav
/
generate
Convert to WAV Format
curl --request POST \
  --url https://api.sunoapi.org/api/v1/wav/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "taskId": "5c79****be8e",
  "audioId": "5c79****be8e",
  "callBackUrl": "https://api.example.com/callback"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}
Convert existing music tracks to high-quality WAV for editing, mastering, or distribution. Submit the identifiers for the track and a callBackUrl. You’ll immediately receive a taskId, and your callback will include a download URL for the WAV file when conversion completes.

Conversion Flow

Step 1: Identify Track

  • By taskId: Use the parent generation task ID
  • By audioId: Pinpoint a specific track (best if multiple tracks exist)
  • Both: Preferred for unambiguous matching

Step 2: Process

  • Lossless Export: Converts the selected track to WAV
  • Integrity: Preserves original audio quality (no re-synthesis)

Step 3: Delivery

  • Single Callback: Your callBackUrl receives a JSON payload with the WAV download URL
  • Correlation: Use returned taskId to match your request

Required Parameters

taskId (string)

  • Description: ID of the originating music generation task
  • Note: At least one of taskId or audioId must be provided (supplying both is preferred)

audioId (string)

  • Description: Exact track ID to convert (useful for multi-track tasks)
  • Note: At least one of taskId or audioId must be provided

callBackUrl (string, uri)

  • Description: Receives completion notification and the WAV download URL
  • Requirement: Must accept JSON POST payloads

Success Response (immediate)

{
  "code": 200,
  "msg": "success",
  "data": { "taskId": "5c79****be8e" }
}

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

The task ID of the music generation task. At least one of taskId or audioId must be provided.

Example:

"5c79****be8e"

audioId
string
required

The audio ID of the specific track to convert. At least one of taskId or audioId must be provided.

Example:

"5c79****be8e"

callBackUrl
string<uri>
required

The URL to receive WAV conversion completion notification. Callback includes a single download URL for the converted WAV file.

Example:

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

Response

Request successful

code
enum<integer>

Status code. 200 - Request successful, 400 - Invalid parameters, 401 - Unauthorized access, 404 - Invalid request method or path, 405 - Rate limit exceeded, 413 - Theme or prompt too long, 429 - Insufficient credits, 430 - Your call frequency is too high. Please try again later, 455 - System maintenance, 500 - Server error

Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object