curl --request POST \
--url https://api.apimart.ai/v1/music/generations/coverFlowMusic \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}'
import requests
url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic"
payload = {
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic";
const payload = {
model: "flowmusic",
clip_id: "abc123-def456",
instruction: "Rearrange this song in jazz style",
strength: 0.5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KWXVD0E653EZ9FWD2SD9NNB6"
}
]
}
{
"error": {
"message": "strength must be between 0 and 1",
"type": "invalid_request",
"param": "",
"code": "invalid_request"
}
}
{
"error": {
"message": "Insufficient balance",
"type": "invalid_request",
"param": "",
"code": "quota_not_enough"
}
}
{
"error": {
"message": "Current group capacity is saturated, please retry later",
"type": "rate_limit_error",
"param": "",
"code": "rate_limit_error"
}
}
Flow Music
Cover Rearrangement
Flow Music rearranges an entire song into a new style (cover / restyle), with strength controlling the editing intensity
POST
/
v1
/
music
/
generations
/
coverFlowMusic
curl --request POST \
--url https://api.apimart.ai/v1/music/generations/coverFlowMusic \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}'
import requests
url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic"
payload = {
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic";
const payload = {
model: "flowmusic",
clip_id: "abc123-def456",
instruction: "Rearrange this song in jazz style",
strength: 0.5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KWXVD0E653EZ9FWD2SD9NNB6"
}
]
}
{
"error": {
"message": "strength must be between 0 and 1",
"type": "invalid_request",
"param": "",
"code": "invalid_request"
}
}
{
"error": {
"message": "Insufficient balance",
"type": "invalid_request",
"param": "",
"code": "quota_not_enough"
}
}
{
"error": {
"message": "Current group capacity is saturated, please retry later",
"type": "rate_limit_error",
"param": "",
"code": "rate_limit_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/music/generations/coverFlowMusic \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}'
import requests
url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic"
payload = {
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/music/generations/coverFlowMusic";
const payload = {
model: "flowmusic",
clip_id: "abc123-def456",
instruction: "Rearrange this song in jazz style",
strength: 0.5
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KWXVD0E653EZ9FWD2SD9NNB6"
}
]
}
{
"error": {
"message": "strength must be between 0 and 1",
"type": "invalid_request",
"param": "",
"code": "invalid_request"
}
}
{
"error": {
"message": "Insufficient balance",
"type": "invalid_request",
"param": "",
"code": "quota_not_enough"
}
}
{
"error": {
"message": "Current group capacity is saturated, please retry later",
"type": "rate_limit_error",
"param": "",
"code": "rate_limit_error"
}
}
Authentication
string
required
All endpoints require Bearer Token authenticationGet your API Key:Visit the API Key management page to get your API KeyAdd it to the request header:
Authorization: Bearer YOUR_API_KEY
Request Parameters
string
required
Model name, must be
"flowmusic" (case-insensitive)string
required
Unique identifier of the source music, from a successful task’s
result.music[].clip_idstring
required
Cover editing instructionExample:
"Rearrange this song in jazz style"number
required
Editing intensityRange:
0 ~ 1; higher values mean larger changesstring
Title of the covered music
string
Random seed, used to reproduce results
Response
integer
Response status code, 200 on success
array
Use Cases
Scenario 1: Rearrange the whole song in jazz style
{
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "Rearrange this song in jazz style",
"strength": 0.5
}
Scenario 2: Import external audio, then rearrange
First import external audio via Upload Audio to obtain a clip_id, then run the Cover:{
"model": "flowmusic",
"clip_id": "1db3a20f-4ddc-44e8-8c9c-6c9093c16ffe",
"instruction": "Turn it into jazz style",
"strength": 0.6
}
Query Task ResultsCover rearrangement is an asynchronous task; a
task_id is returned after submission. Use the Get Task Status endpoint to query generation progress and results. The Cover output is a new clip_id; use the new clip_id for subsequent operations.Completed Task Result Example
Query response example (GET /v1/music/tasks/{task_id}):
{
"code": 200,
"data": {
"id": "task_01KWXVD0E653EZ9FWD2SD9NNB6",
"status": "completed",
"progress": 100,
"created": 1783413244,
"completed": 1783413315,
"actual_time": 71,
"cost": 0.048,
"credits_cost": 0.48,
"result": {
"music": [
{
"clip_id": "ef3d804e-fa97-402f-ba17-4ff08270159b",
"title": "Untitled (Cover)",
"duration_seconds": "178.03733333",
"create_time": "2026-07-07T08:34:58.112190Z",
"lyrics": "[Verse 1]\nWaking up to the morning light,\n...",
"lyrics_id": "c302d603-81b6-552f-8122-e512928d6aa1",
"lyrics_timing_markers": [[10, 12], [212, 36]],
"audio_url": "https://cdn.apimart.ai/audio/flowmusic_ef3d804e.m4a",
"wav_url": "https://cdn.apimart.ai/audio/flowmusic_ef3d804e.wav",
"image_url": "https://cdn.apimart.ai/image/flowmusic_ef3d804e_cover.jpg"
}
]
}
}
}