> ## Documentation Index
> Fetch the complete documentation index at: https://gccai.heqingsong.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Cover Rearrangement

> Flow Music rearranges an entire song into a new style (cover / restyle), with strength controlling the editing intensity

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://gccai.heqingsong.uk/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
    }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://gccai.heqingsong.uk/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())
  ```

  ```javascript JavaScript theme={null}
  const url = "https://gccai.heqingsong.uk/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));
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "code": 200,
    "data": [
      {
        "status": "submitted",
        "task_id": "task_01KWXVD0E653EZ9FWD2SD9NNB6"
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "message": "strength must be between 0 and 1",
      "type": "invalid_request",
      "param": "",
      "code": "invalid_request"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "error": {
      "message": "Insufficient balance",
      "type": "invalid_request",
      "param": "",
      "code": "quota_not_enough"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "message": "Current group capacity is saturated, please retry later",
      "type": "rate_limit_error",
      "param": "",
      "code": "rate_limit_error"
    }
  }
  ```
</ResponseExample>

## Authentication

<ParamField header="Authorization" type="string" required>
  All endpoints require Bearer Token authentication

  Get your API Key:

  Visit the [API Key management page](https://gccai.heqingsong.uk/keys) to get your API Key

  Add it to the request header:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Request Parameters

<ParamField body="model" type="string" required>
  Model name, **must be `"flowmusic"`** (case-insensitive)
</ParamField>

<ParamField body="clip_id" type="string" required>
  Unique identifier of the source music, from a successful task's `result.music[].clip_id`
</ParamField>

<ParamField body="instruction" type="string" required>
  Cover editing instruction

  Example: `"Rearrange this song in jazz style"`
</ParamField>

<ParamField body="strength" type="number" required>
  Editing intensity

  Range: `0` \~ `1`; higher values mean larger changes
</ParamField>

<ParamField body="title" type="string">
  Title of the covered music
</ParamField>

<ParamField body="seed" type="string">
  Random seed, used to reproduce results
</ParamField>

## Response

<ResponseField name="code" type="integer">
  Response status code, 200 on success
</ResponseField>

<ResponseField name="data" type="array">
  Array of returned data

  <Expandable title="Array elements">
    <ResponseField name="status" type="string">
      Task status, `submitted` upon initial submission
    </ResponseField>

    <ResponseField name="task_id" type="string">
      Unique task identifier, used to query task status and results
    </ResponseField>
  </Expandable>
</ResponseField>

## Use Cases

### Scenario 1: Rearrange the whole song in jazz style

```json theme={null}
{
  "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](./upload-audio) to obtain a clip\_id, then run the Cover:

```json theme={null}
{
  "model": "flowmusic",
  "clip_id": "1db3a20f-4ddc-44e8-8c9c-6c9093c16ffe",
  "instruction": "Turn it into jazz style",
  "strength": 0.6
}
```

<Note>
  **Query Task Results**

  Cover rearrangement is an asynchronous task; a `task_id` is returned after submission. Use the [Get Task Status](./query) endpoint to query generation progress and results. The Cover output is a **new** `clip_id`; use the new clip\_id for subsequent operations.
</Note>

## Completed Task Result Example

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

```json theme={null}
{
  "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://gccai.heqingsong.uk/_gccai/cdn/audio/flowmusic_ef3d804e.m4a",
          "wav_url": "https://gccai.heqingsong.uk/_gccai/cdn/audio/flowmusic_ef3d804e.wav",
          "image_url": "https://gccai.heqingsong.uk/_gccai/cdn/image/flowmusic_ef3d804e_cover.jpg"
        }
      ]
    }
  }
}
```
