MusicAPI
HomeDocs
HomeDocs
  1. producer
  • Introduction
  • Credits Usage Guide
  • Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • 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)
    • create music (with description)
    • cover music
    • extend music
    • replace music section
    • swap music sound
    • swap music vocals
    • upload
    • get music
  • producer
    • Producer instructions
    • Complete Request Examples
    • create music
      POST
    • upload
      POST
    • download
      POST
    • get music
      GET
    • Extend an existing music track
      POST
    • Replace a section of an existing music track
      POST
  • 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
    • 记录不存在
    • CreateTaskAccepted
    • 参数不正确
    • ErrorResponse
  1. producer

Extend an existing music track

POST
https://api.musicapi.ai/api/v1/producer/create
Extend a previously generated or uploaded clip from a specific timestamp. The new content is appended starting at starts_at and runs for length seconds.
Auto-refund: if the upstream extension fails, the 12-credit charge is automatically refunded.

Migration note#

This operation replaced the legacy Producer extend endpoint in 2026-04. The old starts (number) and lyrics_text parameters are still accepted but you should prefer starts_at, lyrics, and the new instruction / length fields.

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/jsonRequired

Examples
{
    "task_type": "extend_music",
    "clip_id": "abc123xyz789",
    "starts_at": 45,
    "instruction": "Add soaring violin strings and an uplifting orchestral build with increasing intensity. Conclude with a triumphant final chord.",
    "length": 30
}

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 --request POST 'https://api.musicapi.ai/api/v1/producer/create' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task_type": "extend_music",
    "clip_id": "abc123xyz789",
    "starts_at": 45,
    "instruction": "Add soaring violin strings and an uplifting orchestral build with increasing intensity. Conclude with a triumphant final chord.",
    "length": 30
}'

Responses

🟢200
application/json
Task accepted. Poll GET /api/v1/producer/task/{task_id} for the result.
Body

Example
{
    "message": "success",
    "task_id": "29906f02-2366-4218-b25a-41458e1d60e0"
}
🟠400
🟠401
🟠403
🔴500
Modified at 2026-04-27 16:23:36
Previous
get music
Next
Replace a section of an existing music track
Built with