File size: 3,521 Bytes
75374fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
language:
  - en
license: other
pipeline_tag: text-to-audio
tags:
  - suno
  - text-to-audio
  - music-generation
inference: false
---

# Suno API

**Model Page:** [Suno API](https://apiframe.ai/models/suno)

Community model card for calling Suno through a REST API.

Suno has no official public API. This repo documents the `suno` model as exposed by Apiframe: text-to-music on the current V4–V5.5 line, two tracks per job, custom or auto lyrics, and follow-up actions (extend, cover, add vocals, stems).

This repository does not host weights. Suno is a closed model. Inference runs remotely.

<img src="https://apiframe.ai/models-examples/suno-cover-finish-line.webp" alt="Sample output" width="280" />

## Model description

| | |
|---|---|
| Architecture | Suno (default `V4_5PLUS`; pin `V4`, `V4_5`, `V5`, or `V5_5`) |
| Task | text-to-music; lyrics-to-music |
| Output | 2 tracks (`audioUrl`, `imageUrl`, `title`, `duration`) |
| Typical latency | ~110s |

## How to use

```bash
pip install requests
```

```python
import os
import time
import requests

API = "https://api.apiframe.ai/v2"
headers = {
    "X-API-Key": os.environ["APIFRAME_API_KEY"],
    "Content-Type": "application/json",
}

job = requests.post(
    f"{API}/music/generate",
    headers=headers,
    json={
        "model": "suno",
        "prompt": "upbeat electronic track with synth arpeggios and driving bass",
        "sunoParams": {
            "model_version": "V4_5PLUS",
            "style": "electronic, synthwave",
        },
    },
).json()

while True:
    result = requests.get(f"{API}/jobs/{job['jobId']}", headers=headers).json()
    if result["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)

print(result.get("result"))
```

`result["tracks"]` is a list of 2 songs. Pass `webhookUrl` on the generate call if you do not want to poll.

With `custom_mode: false` (default), `prompt` is a description (max 500 characters). With `custom_mode: true`, `prompt` is lyrics (max 5,000 characters). Set `auto_lyrics: true` to keep a long prompt as a description and let Suno write the lyrics.

### Custom lyrics

```python
import os
import requests

headers = {
    "X-API-Key": os.environ["APIFRAME_API_KEY"],
    "Content-Type": "application/json",
}

requests.post(
    "https://api.apiframe.ai/v2/music/generate",
    headers=headers,
    json={
        "model": "suno",
        "prompt": "[Verse 1]\nWalking through the city lights\nNeon glow on rainy nights\n\n[Chorus]\nWe are the dreamers, we are the stars",
        "sunoParams": {
            "custom_mode": True,
            "title": "City Dreamers",
            "style": "pop, indie",
            "vocal_gender": "f",
        },
    },
)
```

### Follow-up actions

```python
import os
import requests

headers = {
    "X-API-Key": os.environ["APIFRAME_API_KEY"],
    "Content-Type": "application/json",
}

requests.post(
    "https://api.apiframe.ai/v2/music/suno/action",
    headers=headers,
    json={
        "parentJobId": "JOB_ID",
        "action": "extend",  # cover | add_vocals | stems
        "index": 1,          # 1-2
    },
)
```

## Limitations

- Closed model. No weights, fine-tuning, or local inference.
- Not an official Suno endpoint. Requires an Apiframe API key (`X-API-Key`).
- Commercial use follows Suno's terms.
- Generated media is retained on the CDN for 90 days.

## License

Outputs are subject to Suno's terms. This card is documentation only. Apiframe is not affiliated with, endorsed by, or sponsored by Suno, Inc.