Skip to main content

Create WAV Format Audio Generation Task

POST 

https://apibox.erweima.ai/api/v1/wav/generate

Create a WAV format audio generation task based on existing audio.

Parameter Details

  • Need to provide taskId or audioId

Important Notes

  1. Generated files are retained for 15 days
  2. Callback has only one stage: complete (generation complete)

Request

Bodyrequired

    taskIdstringrequired

    Task ID returned from audio generation task (required)

    Example: 5c79****be8e
    audioIdstringrequired

    Audio ID of playable music (required)

    Example: 5c79****be8e
    callBackUrlurirequired

    Callback URL for task completion. See callback example

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

Responses

Request successful

Schema
    codeinteger

    Status Codes

    • ✅ 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
    • ⚠️ 455 - System maintenance
    • ❌ 500 - Server error

    Possible values: [200, 400, 401, 404, 405, 413, 429, 455, 500]

    Example: 200
    msgstring

    Error message when code != 200

    Example: success
    data object
    taskIdstring

    Task ID for tracking task status

    Example: 5c79****be8e

Callbacks

POST 

{$request.body#/callBackUrl}

System will call this callback when WAV format audio generation is complete.

Callback Example

{
"code": 200,
"msg": "success",
"data": {
"audio_wav_url": "https://example.com/s/04e6****e727.wav",
"task_id": "988e****c8d3"
}
}

Body

    codeinteger

    Status code

    Example: 200
    msgstring

    Response message

    Example: success
    data object
    task_idstring

    Task ID

    audio_wav_urlstring

    WAV format audio file URL

Callbacks Responses

Callback received successfully

Authorization: http

name: BearerAuthtype: httpscheme: bearerbearerFormat: API Keydescription: # 🔑 API Authentication

All endpoints require authentication using Bearer Token.

## Get API Key

1. Visit the [API Key Management Page](https://sunoapi.org/api-key) 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
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://apibox.erweima.ai/api/v1/wav/generate");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"taskId\": \"5c79****be8e\",\n \"audioId\": \"5c79****be8e\",\n \"callBackUrl\": \"https://api.example.com/callback\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://apibox.erweima.ai
Auth
Body required
{
  "taskId": "5c79****be8e",
  "audioId": "5c79****be8e",
  "callBackUrl": "https://api.example.com/callback"
}
ResponseClear

Click the Send API Request button above and see the response here!