AI audio & voice
Text-to-speech, music generation, sound effects, voice isolation, and voice changing. All audio generation is asynchronous — you start a job and poll until it completes.
#Step 1: Get models & parameters
/v1/ai/toolsCall this endpoint to discover every action, its available models, and the JSON schema each model accepts for params. Use the schema from the response to build your params object in step 2.
curl "https://api.rendley.com/v1/ai/tools" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.rendley.com/v1/ai/tools", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();import requests
res = requests.get(
"https://api.rendley.com/v1/ai/tools",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/tools");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/ai/tools", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/tools")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": [
{
"action": "generate_video",
"models": [
{
"id": "kling-v2.6",
"name": "Kling v2.6",
"schema": {
"properties": {
"prompt": { "type": "string" },
"aspect_ratio": { "type": "string" }
},
"required": ["prompt"]
}
}
]
}
]
}Step 2 is the specific generation endpoint below. Pick the one you need, pass project_id, optionally model_id, and the params from the schema above.
#Generate music
/v1/ai/generate-musicEnqueue a job to generate music from a text prompt describing genre, instruments, tempo, and structure.
Request body
model_idstringOptionalWhich model to use. Call GET /ai/tools to see available models. Each action has a default.
paramsjsonRequiredModel-specific parameters. Call GET /ai/tools to get the schema for each model.
project_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
402Payment Required
curl -X POST "https://api.rendley.com/v1/ai/generate-music" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/generate-music", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-music",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/generate-music");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["prompt" => "..."], "project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-music", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/generate-music")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { prompt: "..." }, project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Which model to use. Call GET /ai/tools to see available models. Each action has a default.
Model-specific parameters. Call GET /ai/tools to get the schema for each model.
#Calculate music generation cost
/v1/ai/generate-music/costCalculate the credit cost of generating music from a text prompt.
Request body
model_idstringOptionalparamsobjectOptionalproject_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
curl -X POST "https://api.rendley.com/v1/ai/generate-music/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/generate-music/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-music/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/generate-music/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-music/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/generate-music/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]#Generate a sound effect
/v1/ai/generate-sound-effectEnqueue a job to generate a custom sound effect from a text description.
Request body
model_idstringOptionalWhich model to use. Call GET /ai/tools to see available models. Each action has a default.
paramsjsonRequiredModel-specific parameters. Call GET /ai/tools to get the schema for each model.
project_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
402Payment Required
curl -X POST "https://api.rendley.com/v1/ai/generate-sound-effect" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/generate-sound-effect", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-sound-effect",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/generate-sound-effect");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["prompt" => "..."], "project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-sound-effect", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/generate-sound-effect")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { prompt: "..." }, project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Which model to use. Call GET /ai/tools to see available models. Each action has a default.
Model-specific parameters. Call GET /ai/tools to get the schema for each model.
#Calculate sound effect generation cost
/v1/ai/generate-sound-effect/costCalculate the credit cost of generating a sound effect from a text description.
Request body
model_idstringOptionalparamsobjectOptionalproject_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
curl -X POST "https://api.rendley.com/v1/ai/generate-sound-effect/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/generate-sound-effect/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-sound-effect/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/generate-sound-effect/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/generate-sound-effect/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/generate-sound-effect/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]#Generate text-to-speech audio
/v1/ai/text-to-speechEnqueue a job to generate spoken-word audio from text using a selected voice.
Request body
model_idstringOptionalWhich model to use. Call GET /ai/tools to see available models. Each action has a default.
paramsjsonRequiredModel-specific parameters. Call GET /ai/tools to get the schema for each model.
project_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
402Payment Required
curl -X POST "https://api.rendley.com/v1/ai/text-to-speech" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/text-to-speech",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["prompt" => "..."], "project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/text-to-speech", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { prompt: "..." }, project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Which model to use. Call GET /ai/tools to see available models. Each action has a default.
Model-specific parameters. Call GET /ai/tools to get the schema for each model.
#Calculate text-to-speech cost
/v1/ai/text-to-speech/costCalculate the credit cost of generating spoken-word audio from text.
Request body
model_idstringOptionalparamsobjectOptionalproject_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
curl -X POST "https://api.rendley.com/v1/ai/text-to-speech/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/text-to-speech/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/text-to-speech/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]#List text-to-speech voices
/v1/ai/text-to-speech/voicesList available text-to-speech voices, with optional pagination and search.
Query parameters
pagestringOptionalPage number
limitstringOptionalPage size
querystringOptionalSearch query
Response codes
200OK
401Unauthorized
curl "https://api.rendley.com/v1/ai/text-to-speech/voices" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/voices", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();import requests
res = requests.get(
"https://api.rendley.com/v1/ai/text-to-speech/voices",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/voices");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/ai/text-to-speech/voices", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/voices")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": [
{
"id": "string",
"model_id": "string",
"name": "string",
"preview_audio_url": "string"
}
]
}#Get a voice preview
/v1/ai/text-to-speech/voices/{voiceId}/previewGet a preview audio URL for a specific text-to-speech voice.
Path parameters
voiceIdstringVoice ID
Response codes
200OK
401Unauthorized
curl "https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();import requests
res = requests.get(
"https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/text-to-speech/voices/VOICE_ID/preview")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": {
"preview_audio_url": "string"
}
}#Change the voice in a clip
/v1/ai/voice-changerEnqueue a job to replace the voice in an audio or video clip with a different target voice.
Request body
clip_idstringOptionalfile_urlstringOptionalmodel_idstringOptionalWhich model to use. Call GET /ai/tools to see available models. Each action has a default.
paramsjsonRequiredModel-specific parameters. Call GET /ai/tools to get the schema for each model.
project_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
402Payment Required
curl -X POST "https://api.rendley.com/v1/ai/voice-changer" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/voice-changer", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/voice-changer",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/voice-changer");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["prompt" => "..."], "project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/voice-changer", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/voice-changer")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { prompt: "..." }, project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Which model to use. Call GET /ai/tools to see available models. Each action has a default.
Model-specific parameters. Call GET /ai/tools to get the schema for each model.
#Calculate voice changer cost
/v1/ai/voice-changer/costCalculate the credit cost of replacing the voice in an audio or video clip.
Request body
clip_idstringOptionalfile_urlstringOptionalmodel_idstringOptionalparamsobjectOptionalproject_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
curl -X POST "https://api.rendley.com/v1/ai/voice-changer/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/voice-changer/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/voice-changer/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/voice-changer/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/voice-changer/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/voice-changer/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]#Isolate voice from audio
/v1/ai/voice-isolationEnqueue a job to isolate human voice and remove background noise, music, and other unwanted sounds.
Request body
clip_idstringOptionalfile_urlstringOptionalmodel_idstringOptionalWhich model to use. Call GET /ai/tools to see available models. Each action has a default.
paramsjsonRequiredModel-specific parameters. Call GET /ai/tools to get the schema for each model.
project_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
402Payment Required
curl -X POST "https://api.rendley.com/v1/ai/voice-isolation" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/voice-isolation", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/voice-isolation",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/voice-isolation");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["params" => ["prompt" => "..."], "project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"params": {
"prompt": "..."
},
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/voice-isolation", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/voice-isolation")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { params: { prompt: "..." }, project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Which model to use. Call GET /ai/tools to see available models. Each action has a default.
Model-specific parameters. Call GET /ai/tools to get the schema for each model.
#Calculate voice isolation cost
/v1/ai/voice-isolation/costCalculate the credit cost of isolating voice and removing background noise from audio.
Request body
clip_idstringOptionalfile_urlstringOptionalmodel_idstringOptionalparamsobjectOptionalproject_idstringRequiredResponse codes
200OK
400Bad Request
401Unauthorized
curl -X POST "https://api.rendley.com/v1/ai/voice-isolation/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}'const res = await fetch("https://api.rendley.com/v1/ai/voice-isolation/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json();import requests
res = requests.post(
"https://api.rendley.com/v1/ai/voice-isolation/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/ai/voice-isolation/cost");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["project_id" => "<project_id>"]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func main() {
body := bytes.NewBufferString(`{
"project_id": "<project_id>"
}`)
req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/ai/voice-isolation/cost", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/ai/voice-isolation/cost")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { project_id: "<project_id>" }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]#Step 3: Poll the job
/v1/jobs/{job_id}Poll this endpoint every few seconds until status is completed or failed. See Jobs and polling for the full loop.
The result contains a media_id and file_hash. Use the next step to get a download URL.
curl "https://api.rendley.com/v1/jobs/{job_id}" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.rendley.com/v1/jobs/{job_id}", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();import requests
res = requests.get(
"https://api.rendley.com/v1/jobs/{job_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/jobs/{job_id}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/jobs/{job_id}", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/jobs/{job_id}")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": {
"status": "completed",
"result_data": "{\"media_id\":\"med_abc...\",\"file_hash\":\"sha256_def...\"}"
}
}#Step 4: Get the download URL
/v1/uploadsPass the file_hash from the completed job to get a presigned download URL. The storage_url is time-limited, so download the file promptly.
curl "https://api.rendley.com/v1/uploads" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.rendley.com/v1/uploads", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();import requests
res = requests.get(
"https://api.rendley.com/v1/uploads",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]$ch = curl_init("https://api.rendley.com/v1/uploads");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/uploads", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}require "net/http"
require "json"
uri = URI("https://api.rendley.com/v1/uploads")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]Response
{
"data": {
"storage_url": "https://storage.rendley.com/uploads/...png",
"media_id": "med_abc..."
}
}