Recommend presets for an intent
curl --request POST \
--url https://api.varg.ai/v2/presets/recommend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent": "deep male voice for narration",
"type": "voice",
"limit": 5
}
'import requests
url = "https://api.varg.ai/v2/presets/recommend"
payload = {
"intent": "deep male voice for narration",
"type": "voice",
"limit": 5
}
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({intent: 'deep male voice for narration', type: 'voice', limit: 5})
};
fetch('https://api.varg.ai/v2/presets/recommend', 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.varg.ai/v2/presets/recommend",
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([
'intent' => 'deep male voice for narration',
'type' => 'voice',
'limit' => 5
]),
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.varg.ai/v2/presets/recommend"
payload := strings.NewReader("{\n \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\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.varg.ai/v2/presets/recommend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.varg.ai/v2/presets/recommend")
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 \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"id": "preset_5f4dcc3b5aa7",
"kind": "provider_value",
"type": "voice",
"namespace": "elevenlabs",
"name": "Brian",
"description": "Deep, professional male voice",
"preview_url": "https://s3.varg.ai/presets/voice/brian.mp3",
"metadata": {
"gender": "male",
"tone": [
"deep"
]
},
"confidence": 0.83,
"why": [
"name",
"tone=deep",
"gender=male"
]
}
]
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Presets
Recommend presets for an intent
Ranks presets against a free-text description of what you want, using
keyword overlap over name, description and metadata. Presets with no
match are excluded. confidence is comparable only within one response.
Auth is optional.
POST
/
presets
/
recommend
Recommend presets for an intent
curl --request POST \
--url https://api.varg.ai/v2/presets/recommend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"intent": "deep male voice for narration",
"type": "voice",
"limit": 5
}
'import requests
url = "https://api.varg.ai/v2/presets/recommend"
payload = {
"intent": "deep male voice for narration",
"type": "voice",
"limit": 5
}
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({intent: 'deep male voice for narration', type: 'voice', limit: 5})
};
fetch('https://api.varg.ai/v2/presets/recommend', 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.varg.ai/v2/presets/recommend",
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([
'intent' => 'deep male voice for narration',
'type' => 'voice',
'limit' => 5
]),
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.varg.ai/v2/presets/recommend"
payload := strings.NewReader("{\n \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\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.varg.ai/v2/presets/recommend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.varg.ai/v2/presets/recommend")
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 \"intent\": \"deep male voice for narration\",\n \"type\": \"voice\",\n \"limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"id": "preset_5f4dcc3b5aa7",
"kind": "provider_value",
"type": "voice",
"namespace": "elevenlabs",
"name": "Brian",
"description": "Deep, professional male voice",
"preview_url": "https://s3.varg.ai/presets/voice/brian.mp3",
"metadata": {
"gender": "male",
"tone": [
"deep"
]
},
"confidence": 0.83,
"why": [
"name",
"tone=deep",
"gender=male"
]
}
]
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Authorizations
varg API key (varg_...). Get one at app.varg.ai
or run bunx vargai login. App sessions may alternatively send a
Supabase JWT.
Body
application/json
Free-text description of what you want.
Minimum string length:
1Example:
"calm female british voice"
Narrow to one parameter type.
Narrow to one id system.
Only presets deliverable into this tool.
Max results. Larger values are clamped to 50; invalid values fall back to 10.
Required range:
x <= 50Was this page helpful?