# Replace section

> Suno v1 has its own task system, different from Suno v2: a submit returns a numeric taskId and results come from the v1 query endpoints; task IDs and result formats are not interchangeable between the two. For the OpenAI-style entry use /v1/audio/generations (model suno_v1).

**What**：Rewrite one section of a song (lyrics or melody) and keep the rest unchanged.

**When**：Use it when you like a song overall and only want to change a few seconds. Put the song in cover_clip_id and mark the range with cover_start_s / cover_end_s.

## Endpoints
- Submit task: POST `/api/cqt/suno/v1/replaceMusicTask`
- Query the result (with the returned taskId): GET `/api/cqt/suno/v1/sunoInfo?taskId={taskId}`

> After submitting, poll with the taskId — every 5–10 seconds is enough, no need to hit it every second.

## Request params
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| negative_tags | string | — | Style tags to avoid (negative tags). |
| continue_clip_id | string | — | ID (clip id) of the song to continue / extend. |
| continued_aligned_prompt | string | — | Aligned prompt for the continued part (the lyric segment aligned with the timing). |
| continue_at | number | — | Second at which to continue (seconds, e.g. 12.0). |
| cover_clip_id | string | — | ID of the clip to replace a section of. |
| cover_start_s | number | — | Replace range start (seconds). |
| cover_end_s | number | — | Replace range end (seconds). |
| infill_start_s | number | — | Infill start (seconds). |
| infill_end_s | number | — | Infill end (seconds). |
| infill_dur_s | number | — | Infill duration (seconds). |
| infill_context_start_s | number | — | Infill context start (seconds). |
| infill_context_end_s | number | — | Infill context end (seconds). |
| infill_lyrics | string | — | Lyrics for the infilled section. |
| artist_clip_id | string | — | Clip ID used as the artist-style reference. |
| artist_start_s | number | — | Start (seconds) of the artist-style segment. |
| artist_end_s | number | — | End (seconds) of the artist-style segment. |
| user_uploaded_images_b64 | string | — | Base64 encoding of the user-uploaded image. |
| make_instrumental | boolean | — | Whether to generate an instrumental version (no vocals). |
| prompt | string | — | Main prompt / lyrics (put lyrics here in custom mode; an empty string is allowed, null is not). |
| tags | string | — | Style tags, comma-separated English words recommended, e.g. "pop, upbeat". |
| title | string | — | Song title. |
| model | string | — | Model version, e.g. suno_v45 / suno_v45_lite / suno_v40; suno_v35 is automatically changed to suno_v45_lite. Fill either this or modelVersion; if both are set, model wins. Credits are looked up by "endpoint:model", and an unconfigured value returns "积分规则未配置或禁用", so in practice you must send it. |
| modelVersion | string | — | Alias of model (compatibility spelling); only used when model is empty. |

## Request example
```bash
curl -X POST https://api.novapi.ai/api/cqt/suno/v1/replaceMusicTask \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"cover_clip_id":"<clipId>","cover_start_s":30,"cover_end_s":45,"infill_lyrics":"new lyrics here","model":"suno_v45"}'
# -> { "code":200, "msg":"success", "data":{ "taskId":1234567890 } }
```

## Response example
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": 1234567890
  }
}
```

## Response fields
| Field | Type | Description |
| --- | --- | --- |
| code | number | Business code: 200 = success; see the error notes for the rest. The HTTP status is normally 200. |
| msg | string | Message: success on success, the reason on failure. |
| data.taskId | number | Task ID (a number). Use it with the query endpoint to fetch the result. |
