> ## 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.

# Add artwork

> Upload or generate cover art and attach it to a song.

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.

## Generate artwork

```javascript theme={null}
const { imageUrl } = await api.post('/api/generation/cover', {
  prompt: 'A sparse green waveform on a black background',
  title: 'Night circuit',
  style: 'Minimal, no text',
});
await api.patch(`/api/songs/${encodeURIComponent(songId)}`, { image: imageUrl });
```

You can also pass the returned URL as `image` when generating a new song.

## Upload an image

```javascript theme={null}
const form = new FormData();
form.append('file', imageFile); // File from your browser file picker
const { imageUrl } = await api.request('/api/generation/cover', {
  method: 'POST', form,
});
```

Send one nonempty `image/*` file, at most 50 MiB. Do not set a multipart Content-Type manually. If you use albums, save the URL as the album's `cover` field through [album update](/dev/endpoints/albums/update).

Artwork generation is separate from [audio Restyle](/dev/guides/edit/extend-restyle).


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