Skip to content
هذه الصفحة غير متاحة بلغتك بعد، لذا تُعرض باللغة الإنجليزية.

Lyria 3.5 Replace Section

Use Lyria 3.5 to replace a specified section of previously generated audio

كل الوثائق
POST/v1/music/generations/replaceFlowMusic

أمثلة على الطلبات

curl --request POST \
  --url https://api.apisea.ai/v1/music/generations/replaceFlowMusic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "flowmusic",
    "version": "lyria-3.5",
    "clip_id": "abc123-def456",
    "start_s": 10,
    "end_s": 20,
    "instruction": "Replace with a piano version"
  }'

Authentication

Authorizationstringrequired

All endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key management page to get your API Key

Add it to the request header:

text
Authorization: Bearer YOUR_API_KEY

Request Parameters

modelstringrequired

Model name, must be "flowmusic" (case-insensitive)

versionstringrequired

Model version, must be "lyria-3.5"

Note

Lyria 3.5 still uses flowmusic as the model name. Do not change model to lyria-3.5 or flowmusic-lyria-3.5.

clip_idstringrequired

Source music clip_id, from a successful task's result.music[].clip_id

start_snumberrequired

Replacement start time (seconds)

end_snumberrequired

Replacement end time (seconds)

Warning

end_s must be greater than start_s and cannot exceed the source clip's duration.

instructionstringrequired

Editing instruction for the replaced section

Example: "Replace with a piano version"

titlestring

Title of the music after replacement

seedinteger

Random seed, used to reproduce or control the generation result

Response

codeinteger

Response status code, 200 on success

dataarray

Array of returned data

Array elements

statusstring

Task status, submitted upon initial submission

task_idstring

Unique task identifier, used to query task status and results

Use Cases

Scenario 1: Replace seconds 10-20 with a piano version

json
{
  "model": "flowmusic",
  "version": "lyria-3.5",
  "clip_id": "abc123-def456",
  "start_s": 10,
  "end_s": 20,
  "instruction": "Replace with a piano version"
}

Note

Query Task Results

Section replacement is an asynchronous task; a task_id is returned after submission. Use the Get Task Status endpoint to query generation progress and results. The replacement output is a new clip_id (the whole song is re-rendered with the specified segment replaced); use the new clip_id for subsequent operations.

Completed Task Result Example

Query response example (GET /v1/music/tasks/{task_id}):

json
{
  "code": 200,
  "data": {
    "id": "task_01KWXVHGTG5JM33S8FG1K90YQ6",
    "status": "completed",
    "progress": 100,
    "created": 1783413392,
    "completed": 1783413454,
    "actual_time": 62,
    "cost": 0.048,
    "credits_cost": 0.48,
    "result": {
      "music": [
        {
          "clip_id": "9508d1fe-633e-464b-8a40-c6368e5464fa",
          "title": "Untitled (Replaced)",
          "duration_seconds": "181.58933333",
          "create_time": "2026-07-07T08:37:13.864452Z",
          "lyrics": "[Verse 1]\nWaking up to the morning light,\n...",
          "lyrics_id": "c302d603-81b6-552f-8122-e512928d6aa1",
          "lyrics_timing_markers": [[10, 12], [71, 15]],
          "audio_url": "https://cdn.example.com/audio/flowmusic_9508d1fe.m4a",
          "wav_url": "https://cdn.example.com/audio/flowmusic_9508d1fe.wav",
          "image_url": "https://cdn.example.com/image/flowmusic_9508d1fe_cover.jpg"
        }
      ]
    }
  }
}

الاستجابات

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KWXVHGTG5JM33S8FG1K90YQ6"
    }
  ]
}

هل وجدت مشكلة في هذه الوثائق؟ راسلنا عبر البريد الإلكتروني support@apisea.ai.