MusicAPI
HomeDocs
HomeDocs
  1. sonic
  • Introduction
  • Credits Usage Guide
  • Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • Get Your Suno API Key
  • sonic
    • Sonic Instructions
    • create / extend / cover / remaster / add vocals / add instrumental
      POST
    • upload and extend music
      POST
    • upload and cover music
      POST
    • create persona
      POST
    • sample
      POST
    • mashup
      POST
    • get BPM
      POST
    • get VOX
      POST
    • get wav
      POST
    • get midi
      POST
    • get lyrics timeline
      POST
    • upsample tags
      POST
    • stems basic
      POST
    • stems full
      POST
    • replace section
      POST
    • upload music
      POST
    • create voice
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
      POST
    • create music (with description)
      POST
    • cover music
      POST
    • extend music
      POST
    • replace music section
      POST
    • swap music sound
      POST
    • swap music vocals
      POST
    • upload
      POST
    • get music
      GET
  • producer
    • Producer instructions
    • Complete Request Examples
    • create music
    • upload
    • download
    • get music
    • Extend an existing music track
    • Replace a section of an existing music track
    • Cover an existing music track
  • studio(Unavailable)
    • Studio Instructions
    • description mode (Use case1)
    • extend mode (Use case2)
    • custom mode (Use case3)
    • instrumental mode (Use case4)
    • get music
  • lyrics generation
    • Make Lyrics
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • get-credits
    GET
  • Schemas
    • ExtendMusicRequest
    • ReplaceMusicRequest
    • 记录不存在
    • CoverMusicRequest
    • CreateTaskAccepted
    • 参数不正确
    • ErrorResponse
  1. sonic

sample

POST
https://api.musicapi.ai/api/v1/sonic/sample
Generate a complete song from a short audio sample or hummed melody. This endpoint uses a clip segment as inspiration to create a full-length track.
Credits cost: 15 (older models) / 20 (newer models) — older = sonic-v3-5, sonic-v4; newer = sonic-v4-5, sonic-v4-5-plus, sonic-v5, sonic-v5-5.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Examples
{
    "sample_clip_id": "abc123-def456-sample",
    "chop_sample_start_s": 0,
    "chop_sample_end_s": 30,
    "custom_mode": true,
    "mv": "chirp-v4-5-plus",
    "make_instrumental": false,
    "prompt": "[Verse 1]\nInspired by this melody\nCreating something beautiful\n\n[Chorus]\nFrom a simple hum\nA full song has come",
    "title": "Melody Dreams",
    "tags": "pop, melodic, uplifting",
    "style_weight": 0.7
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.musicapi.ai/api/v1/sonic/sample' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "sample_clip_id": "abc123-def456-sample",
    "chop_sample_start_s": 0,
    "chop_sample_end_s": 30,
    "custom_mode": true,
    "mv": "chirp-v4-5-plus",
    "make_instrumental": false,
    "prompt": "[Verse 1]\nInspired by this melody\nCreating something beautiful\n\n[Chorus]\nFrom a simple hum\nA full song has come",
    "title": "Melody Dreams",
    "tags": "pop, melodic, uplifting",
    "style_weight": 0.7
}'

Responses

🟢200success
application/json
success
Bodyapplication/json

Examples
{
    "code": 200,
    "message": "success",
    "task_id": "81ed9f60-56ae-48c1-9c46-33a8220dfca7"
}
Modified at 2026-07-31 11:24:31
Previous
create persona
Next
mashup
Built with