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

# Extend and restyle

> Continue a source or generate a different treatment of its audio.

Use the client from [request setup](/dev/guides/connect). These examples assume `api`, `userAddress`, and the returned `songId` are available. `api` includes the session token and selected account headers.

## Extend past the ending

```javascript theme={null}
const job = await api.post('/api/editing/extend', {
  songId, userAddress,
  audioDuration: 90,
  prompt: 'Continue the arrangement with a quiet ending',
  modelQuality: 'sft',
});
```

For a 60-second source, `audioDuration: 90` requests a 90-second result. It is the total length, not 90 extra seconds. The target must exceed decoded source duration. You may supply new lyrics and a requested transition length.

## Restyle source audio

```javascript theme={null}
const job = await api.post('/api/editing/apply', {
  songId, userAddress, task: 'cover',
  prompt: 'Dusty hip-hop drums and muted piano',
  coverStrength: 0.65, coverNoiseStrength: 0.2,
  modelQuality: 'sft',
});
```

`coverStrength` is required and ranges from 0 to 1. `coverNoiseStrength` is optional with the same range. They control the source treatment. For the shortcut, call `/api/editing/remix`; it does not forward seed, BPM, key or language.

Restyle changes audio. [Creating a licensed remix draft](/dev/guides/publish/licenses) is a separate library and wallet workflow.

Use the polling function from [job handling](/dev/guides/jobs#generation-polling).

```javascript theme={null}
// Save job before polling so your product can resume after a reload.
const path = `/api/editing/status/${encodeURIComponent(job.taskId)}?` +
  new URLSearchParams({
    songId: job.songId, userAddress, task: job.task,
    ...(job.stemId ? { stemId: job.stemId } : {}),
  });
const result = await pollJob(() => api.get(path));
```

Keep the returned `taskId`, `songId`, `task`, and optional `stemId`. A polling timeout stops your client from waiting; it does not cancel the job.

Preview the result, then [select or merge the take](/dev/guides/edit/takes).


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