Sound Effect Generation
curl --request POST \
--url https://apis.finevoice.ai/v1/audio/sfx-generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Thunderstorm with heavy rain and distant thunder",
"negative_prompt": "music, voices",
"sourceUrl": "<string>",
"sourceType": "video",
"duration": 5,
"useAsync": true
}
'import requests
url = "https://apis.finevoice.ai/v1/audio/sfx-generation"
payload = {
"prompt": "Thunderstorm with heavy rain and distant thunder",
"negative_prompt": "music, voices",
"sourceUrl": "<string>",
"sourceType": "video",
"duration": 5,
"useAsync": 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({
prompt: 'Thunderstorm with heavy rain and distant thunder',
negative_prompt: 'music, voices',
sourceUrl: '<string>',
sourceType: 'video',
duration: 5,
useAsync: true
})
};
fetch('https://apis.finevoice.ai/v1/audio/sfx-generation', 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://apis.finevoice.ai/v1/audio/sfx-generation",
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' => 'Thunderstorm with heavy rain and distant thunder',
'negative_prompt' => 'music, voices',
'sourceUrl' => '<string>',
'sourceType' => 'video',
'duration' => 5,
'useAsync' => 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://apis.finevoice.ai/v1/audio/sfx-generation"
payload := strings.NewReader("{\n \"prompt\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": 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://apis.finevoice.ai/v1/audio/sfx-generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.finevoice.ai/v1/audio/sfx-generation")
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\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"url": "<string>",
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"code": "<string>",
"message": "<string>"
},
"urls": [
"<string>"
],
"service": "<string>",
"port": "<string>",
"timestamp": "<string>"
}Sound Effects
Sound Effect Generation
Generate royalty-free sound effects from a text prompt or video source.
POST
/
v1
/
audio
/
sfx-generation
Sound Effect Generation
curl --request POST \
--url https://apis.finevoice.ai/v1/audio/sfx-generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Thunderstorm with heavy rain and distant thunder",
"negative_prompt": "music, voices",
"sourceUrl": "<string>",
"sourceType": "video",
"duration": 5,
"useAsync": true
}
'import requests
url = "https://apis.finevoice.ai/v1/audio/sfx-generation"
payload = {
"prompt": "Thunderstorm with heavy rain and distant thunder",
"negative_prompt": "music, voices",
"sourceUrl": "<string>",
"sourceType": "video",
"duration": 5,
"useAsync": 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({
prompt: 'Thunderstorm with heavy rain and distant thunder',
negative_prompt: 'music, voices',
sourceUrl: '<string>',
sourceType: 'video',
duration: 5,
useAsync: true
})
};
fetch('https://apis.finevoice.ai/v1/audio/sfx-generation', 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://apis.finevoice.ai/v1/audio/sfx-generation",
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' => 'Thunderstorm with heavy rain and distant thunder',
'negative_prompt' => 'music, voices',
'sourceUrl' => '<string>',
'sourceType' => 'video',
'duration' => 5,
'useAsync' => 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://apis.finevoice.ai/v1/audio/sfx-generation"
payload := strings.NewReader("{\n \"prompt\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": 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://apis.finevoice.ai/v1/audio/sfx-generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.finevoice.ai/v1/audio/sfx-generation")
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\": \"Thunderstorm with heavy rain and distant thunder\",\n \"negative_prompt\": \"music, voices\",\n \"sourceUrl\": \"<string>\",\n \"sourceType\": \"video\",\n \"duration\": 5,\n \"useAsync\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"url": "<string>",
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"error": {
"code": "<string>",
"message": "<string>"
},
"urls": [
"<string>"
],
"service": "<string>",
"port": "<string>",
"timestamp": "<string>"
}Authorizations
Body
application/json
The sound effect generation request payload.
Response
Task accepted. Returns a taskId for async polling or the result URL directly.
Standard response for audio processing tasks.