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

# Edit & Transform

> crop/removeSection/fadeIn/fadeOut/adjustSpeed/replaceMusic/sample/mashup/concat/coverSong/remaster

Editing operations all take an existing task as source:

```
POST https://toapis.com/v1/music/generations/{operation}
```

<ParamField body="model" type="string" required>Fixed `"suno"`</ParamField>
<ParamField body="task_id" type="string" required>Source task ID (local `tsk_aud_` ID)</ParamField>
<ParamField body="audio_index" type="number">Source track index</ParamField>

## Section editing (\$0.008 each)

| operation | Description | Extra required |
| - | - | - |
| `crop` | Keep a time range | `start_s`, `end_s` |
| `removeSection` | Remove a time range | `start_s`, `end_s` |

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/crop \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","task_id":"tsk_aud_xxx","audio_index":1,"start_s":10,"end_s":40}'
```

## Fades (\$0.008 each)

| operation | Description | Extra required |
| - | - | - |
| `fadeIn` | Intro fade-in | `duration_s` |
| `fadeOut` | Outro fade-out | `duration_s` |

## adjustSpeed — tempo (\$0.024)

<ParamField body="speed" type="number" required>Speed factor, e.g. `0.8` / `1.25`</ParamField>
<ParamField body="keep_pitch" type="boolean">Preserve pitch while changing speed</ParamField>

## Rewrite & remaster

### replaceMusic — section rewrite ($0.05, Max $0.10)

<ParamField body="start_s" type="number" required>Start (seconds)</ParamField>
<ParamField body="end_s" type="number" required>End (seconds)</ParamField>
<ParamField body="infill_lyrics" type="string">New lyrics for the section</ParamField>
<ParamField body="max_mode" type="boolean">Max tier (no `custom` field; applies directly)</ParamField>

### sample — resample ($0.05, Max $0.10)

<Warning>`task_id` must be an `uploadTask` product; other sources are rejected.</Warning>

<ParamField body="start_s" type="number" required>Sample start (seconds)</ParamField>
<ParamField body="end_s" type="number" required>Sample end (seconds)</ParamField>
<ParamField body="gpt_description" type="string">Remix description (required when custom=false)</ParamField>

### coverSong — cover ($0.05, Max $0.10)

<ParamField body="gpt_description" type="string">Target style description (required when custom=false)</ParamField>

<ParamField body="custom" type="boolean" />

<ParamField body="prompt" type="string">Lyrics when custom=true</ParamField>
<ParamField body="style" type="string">Target style</ParamField>

### remaster — remaster (\$0.05)

<ParamField body="variation_category" type="string">Remaster bias (optional)</ParamField>

### mashup — blend ($0.05, Max $0.10)

<ParamField body="task_ids" type="array" required>Exactly 2 source task IDs</ParamField>
<ParamField body="audio_indexes" type="array">Track index per source task</ParamField>
<ParamField body="gpt_description" type="string">Blend description (required when custom=false)</ParamField>

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/mashup \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","task_ids":["tsk_aud_aaa","tsk_aud_bbb"],"gpt_description":"blend into seamless lo-fi"}'
```

### concat — join (\$0.004)

Joins segments produced by `extend` into a full track.

<ParamField body="task_id" type="string" required>`extend` source task ID</ParamField>

## Response

<ResponseField name="task_id" type="string">New task ID</ResponseField>
<ResponseField name="status" type="string">`submitted`</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.