API Reference
Generate music from text prompt
Full-length songs with vocals via MiniMax Music and Google Lyria.
POST
/
v1
/
music
Generate music from text prompt
curl --request POST \
--url https://api.rimp.io/v1/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"duration_s": 97,
"with_vocals": true
}
'import requests
url = "https://api.rimp.io/v1/music"
payload = {
"model": "<string>",
"prompt": "<string>",
"duration_s": 97,
"with_vocals": True
}
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({model: '<string>', prompt: '<string>', duration_s: 97, with_vocals: true})
};
fetch('https://api.rimp.io/v1/music', 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.rimp.io/v1/music",
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([
'model' => '<string>',
'prompt' => '<string>',
'duration_s' => 97,
'with_vocals' => true
]),
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.rimp.io/v1/music"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\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.rimp.io/v1/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rimp.io/v1/music")
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 \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "generation",
"prompt": "<string>",
"params": {},
"reserved_credits": 123,
"charged_credits": 123,
"refunded_credits": 123,
"cache_hit": true,
"outputs": [
{
"id": "<string>",
"mime": "<string>",
"width": 123,
"height": 123,
"duration_s": "<string>",
"url": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
202 - application/json
Music generation queued.
Available options:
generation Available options:
queued, running, succeeded, failed, canceled Available options:
image, video, voice, music, avatar, chat, 3d, upscale Show child attributes
Show child attributes
Previous
Chat completion (synchronous)Synchronous LLM chat completion across GPT-5, Claude, Gemini, Llama, DeepSeek, Mistral, Qwen and Grok. Credits are charged per output token (reconciled on completion).
Next
⌘I
Generate music from text prompt
curl --request POST \
--url https://api.rimp.io/v1/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"duration_s": 97,
"with_vocals": true
}
'import requests
url = "https://api.rimp.io/v1/music"
payload = {
"model": "<string>",
"prompt": "<string>",
"duration_s": 97,
"with_vocals": True
}
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({model: '<string>', prompt: '<string>', duration_s: 97, with_vocals: true})
};
fetch('https://api.rimp.io/v1/music', 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.rimp.io/v1/music",
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([
'model' => '<string>',
'prompt' => '<string>',
'duration_s' => 97,
'with_vocals' => true
]),
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.rimp.io/v1/music"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\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.rimp.io/v1/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rimp.io/v1/music")
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 \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration_s\": 97,\n \"with_vocals\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "generation",
"prompt": "<string>",
"params": {},
"reserved_credits": 123,
"charged_credits": 123,
"refunded_credits": 123,
"cache_hit": true,
"outputs": [
{
"id": "<string>",
"mime": "<string>",
"width": 123,
"height": 123,
"duration_s": "<string>",
"url": "<string>"
}
]
}