curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "brahma-embedding-small",
"input": "The quick brown fox."
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings"
payload = {
"model": "brahma-embedding-small",
"input": "The quick brown fox."
}
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: 'brahma-embedding-small', input: 'The quick brown fox.'})
};
fetch('https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings', 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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings",
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' => 'brahma-embedding-small',
'input' => 'The quick brown fox.'
]),
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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings"
payload := strings.NewReader("{\n \"model\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings")
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\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\n}"
response = http.request(request)
puts response.read_bodyProxy Embeddings
OpenAI-compatible embeddings, org-scoped by the caller’s PeachDesk API key, proxied to the self-hosted BRAHMA embedding plane.
MODEL-BASED PLANE ROUTING: model == "brahma-embedding-large" is served on
the dedicated large endpoint (VOICE_ENGINE_EMBEDDING_LARGE_URL); every other
model (incl. brahma-embedding-small) rides the shared plane
(VOICE_ENGINE_EMBEDDING_URL) exactly as before. Only the upstream base URL
differs — the raw body relays verbatim and the response/usage relay is identical.
Returns 503 when the selected plane’s URL is unset (the shared plane for other
models, the large plane for brahma-embedding-large) and 400 when the caller
has no selected org. A brahma-embedding-large request with an unset large
URL answers a clean 503 and is NEVER downgraded to the small plane — that would
return small-dimension vectors under the -large name and corrupt the
caller’s vector store. Upstream 502/503 received before the body was relayed
(RunPod worker churn) is retried up to 2 more times with short backoff; terminal
upstream errors map via _upstream_error_response. Input token usage is
metered per org after the relay completes.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "brahma-embedding-small",
"input": "The quick brown fox."
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings"
payload = {
"model": "brahma-embedding-small",
"input": "The quick brown fox."
}
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: 'brahma-embedding-small', input: 'The quick brown fox.'})
};
fetch('https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings', 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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings",
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' => 'brahma-embedding-small',
'input' => 'The quick brown fox.'
]),
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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings"
payload := strings.NewReader("{\n \"model\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\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.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings")
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\": \"brahma-embedding-small\",\n \"input\": \"The quick brown fox.\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Body
OpenAI-compatible embeddings request. Additional OpenAI parameters not listed here are forwarded to the engine unchanged.
Text to embed: a single string, an array of strings, an array of token ids, or an array of token-id arrays.
"The quick brown fox."
Model id from GET /v1/models. brahma-embedding-large is served on its own plane; anything else uses the shared plane.
"brahma-embedding-small"
Truncate the returned vectors to this many dimensions (the BRAHMA embedding models are MRL).
float, base64 Response
Successful Response

