lyrics infill
curl --request POST \
--url https://api.mountsea.ai/suno/v2/lyricsInfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "a hopeful chorus about coming home",
"context_lyrics_prefix": "<string>",
"context_lyrics_edit": "<string>",
"context_lyrics_suffix": "<string>",
"title": "<string>"
}
'import requests
url = "https://api.mountsea.ai/suno/v2/lyricsInfill"
payload = {
"prompt": "a hopeful chorus about coming home",
"context_lyrics_prefix": "<string>",
"context_lyrics_edit": "<string>",
"context_lyrics_suffix": "<string>",
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'a hopeful chorus about coming home',
context_lyrics_prefix: '<string>',
context_lyrics_edit: '<string>',
context_lyrics_suffix: '<string>',
title: '<string>'
})
};
fetch('https://api.mountsea.ai/suno/v2/lyricsInfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/suno/v2/lyricsInfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'a hopeful chorus about coming home',
'context_lyrics_prefix' => '<string>',
'context_lyrics_edit' => '<string>',
'context_lyrics_suffix' => '<string>',
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/suno/v2/lyricsInfill"
payload := strings.NewReader("{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/suno/v2/lyricsInfill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/suno/v2/lyricsInfill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Suno
Lyrics Infill
Fill or rewrite a span of lyrics without generating music
POST
/
suno
/
v2
/
lyricsInfill
lyrics infill
curl --request POST \
--url https://api.mountsea.ai/suno/v2/lyricsInfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "a hopeful chorus about coming home",
"context_lyrics_prefix": "<string>",
"context_lyrics_edit": "<string>",
"context_lyrics_suffix": "<string>",
"title": "<string>"
}
'import requests
url = "https://api.mountsea.ai/suno/v2/lyricsInfill"
payload = {
"prompt": "a hopeful chorus about coming home",
"context_lyrics_prefix": "<string>",
"context_lyrics_edit": "<string>",
"context_lyrics_suffix": "<string>",
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'a hopeful chorus about coming home',
context_lyrics_prefix: '<string>',
context_lyrics_edit: '<string>',
context_lyrics_suffix: '<string>',
title: '<string>'
})
};
fetch('https://api.mountsea.ai/suno/v2/lyricsInfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mountsea.ai/suno/v2/lyricsInfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'a hopeful chorus about coming home',
'context_lyrics_prefix' => '<string>',
'context_lyrics_edit' => '<string>',
'context_lyrics_suffix' => '<string>',
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountsea.ai/suno/v2/lyricsInfill"
payload := strings.NewReader("{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountsea.ai/suno/v2/lyricsInfill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/suno/v2/lyricsInfill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"a hopeful chorus about coming home\",\n \"context_lyrics_prefix\": \"<string>\",\n \"context_lyrics_edit\": \"<string>\",\n \"context_lyrics_suffix\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Write or rewrite one span of lyrics. This calls the official lyrics-infill endpoint and returns that body in the same response. It does not create a clip, and it does not change Generate Lyrics or Generate Music.
Synchronous. The lyrics are in this response. No
taskId — do not poll Get Task Status.Parameters
| Field | Required | Notes |
|---|---|---|
prompt | Yes | What to write or how to change the span. Example: a hopeful chorus about coming home |
context_lyrics_prefix | No | Lyrics before the span. Omit and the server sends "" |
context_lyrics_edit | No | The span being rewritten. Omit and the server sends "" |
context_lyrics_suffix | No | Lyrics after the span. Omit and the server sends "" |
title | No | Song title. Omit and the server sends "" |
Example
curl -X POST https://api.mountsea.ai/suno/v2/lyricsInfill \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"prompt": "a hopeful chorus about coming home",
"title": "Home",
"context_lyrics_prefix": "[Verse]\nPacked the car before the sun",
"context_lyrics_edit": "[Chorus]\n",
"context_lyrics_suffix": "[Verse]\nHighway lines until they blur"
}'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Instruction for the lyrics to write or fill in.
Example:
"a hopeful chorus about coming home"
Lyrics before the edit. Omitted values are sent as an empty string.
Lyrics currently selected for edit. Omitted values are sent as an empty string.
Lyrics after the edit. Omitted values are sent as an empty string.
Song title. Omitted values are sent as an empty string.
Response
201 - application/json
The response is of type object.