> For the complete documentation index, see [llms.txt](https://bountyv.gitbook.io/vdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bountyv.gitbook.io/vdocs/youtube-tools-api/music-suno.md).

# Suno (text-to-song)

Generate a full song — vocals, structure, production — from a description or your own lyrics. **One request renders TWO takes.**

```
POST /api/v1/music/suno
GET  /api/v1/music/suno/{task_id}
```

Asynchronous: submit charges up front and returns a `task_id` to poll. If the generation later fails, the charge is refunded automatically on the poll that observes it.

## Authentication

```
Authorization: Bearer sk_live_...
```

Requires the **`youtube`** product on your account.

## Request

**Content-Type:** `application/json`

| Field          | Type    | Required | Default    | Description                                                                   |
| -------------- | ------- | -------- | ---------- | ----------------------------------------------------------------------------- |
| `mode`         | string  | —        | `"simple"` | `"simple"` describes the song in `prompt`; `"custom"` takes your own lyrics   |
| `prompt`       | string  | ✅        | —          | A description of the song (simple), or the actual lyrics (custom with vocals) |
| `style`        | string  | custom   | —          | Musical style. **Required in `custom` mode**                                  |
| `title`        | string  | custom   | —          | Song title. **Required in `custom` mode**                                     |
| `instrumental` | boolean | —        | `false`    | No vocals                                                                     |
| `model`        | string  | —        | `"V5_5"`   | `"V5_5"` (newest) \| `"V5"` \| `"V4_5PLUS"` \| `"V4_5"` \| `"V4"`             |
| `negativeTags` | string  | —        | —          | Styles to steer away from                                                     |

## Response — submit

```json
{
  "task_id": "5c79a1f0e2",
  "status": "pending",
  "poll_url": "/api/v1/music/suno/5c79a1f0e2",
  "charged_cents": 60,
  "balance_cents": 4940
}
```

## Polling

```
GET /api/v1/music/suno/{task_id}
```

| Response                                                         | Meaning                                                   |
| ---------------------------------------------------------------- | --------------------------------------------------------- |
| `{ "status": "pending", "suno_status": "...", "tracks": [...] }` | Still rendering. `tracks` may already hold the first take |
| `{ "status": "completed", "tracks": [...] }`                     | Both takes ready                                          |
| `{ "status": "failed", "error": "...", "refunded_cents": 60 }`   | Failed; the up-front charge has been refunded             |

You can only poll tasks you created — ownership is verified against the up-front charge recorded for that `task_id`.

## Example

```bash
# 1. submit
curl -X POST https://substance-api.com/api/v1/music/suno \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"prompt": "upbeat synthwave with a driving bassline", "instrumental": true}'

# 2. poll
curl https://substance-api.com/api/v1/music/suno/5c79a1f0e2 \
  -H "Authorization: Bearer sk_live_..."
```

## Errors

| Status | When                                                                                                                                                           |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | Missing `prompt`, or missing `style`/`title` in `custom` mode                                                                                                  |
| `401`  | Missing/invalid API key                                                                                                                                        |
| `402`  | Insufficient credits                                                                                                                                           |
| `403`  | `youtube` product not enabled, or polling a task you didn't create                                                                                             |
| `503`  | Song generation is temporarily unavailable upstream. **Your balance is not charged** — the `detail` field distinguishes this from your own balance running out |

A `failed` result arrives with HTTP `200` on poll — it's a render outcome, not a transport error. See [Errors](/vdocs/errors.md).

## Pricing

$0.60 per request, which renders **two tracks**. Charged on submit and refunded in full if the generation fails. See [Credits & pricing](/vdocs/account/credits.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bountyv.gitbook.io/vdocs/youtube-tools-api/music-suno.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
