Proxy Embeddings
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_bodyBibha BRAHMA LLM
Embeddings
Generate text embeddings with Bibha BRAHMA embedding models — OpenAI-compatible.
POST
/
api
/
v1
/
voice-engine
/
embeddings
/
v1
/
embeddings
Proxy Embeddings
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_bodyGenerate vector embeddings with your organization’s self-hosted BRAHMA embedding models.
Both are multilingual (English, Hindi, and other Indian + European languages) and support Matryoshka dimension shortening: pass
POST /api/v1/voice-engine/embeddings/v1/embeddings
The request and response bodies follow the OpenAI embeddings schema, so existing OpenAI clients work by pointing at this base URL and authenticating with your PeachDesk API key (X-API-Key). Requests route to your organization’s self-hosted embedding GPU, never to an external provider. Responses include a usage object with prompt_tokens and total_tokens (embeddings bill input tokens only). Every response carries per-organization rate-limit headers; non-2xx responses use the OpenAI error format.
Models
| Model | Dimensions | Best for | Price (input) |
|---|---|---|---|
brahma-embedding-small | 1024 (Matryoshka — shorten via dimensions) | Cost-efficient RAG, search, clustering | $0.02 / 1M tokens |
brahma-embedding-large | 2560 (Matryoshka) | Highest retrieval quality, multilingual | $0.13 / 1M tokens |
dimensions to get a shorter, already-normalized vector that trades a little accuracy for smaller storage and faster similarity math.
Request fields
| Field | Type | Notes |
|---|---|---|
input (required) | string · string[] (≤ 2048) · token arrays | The text(s) to embed. Max 8192 tokens per input. |
model (required) | string | brahma-embedding-small or brahma-embedding-large. |
dimensions | integer | Shorten the output vector (1 … model default). |
encoding_format | "float" (default) · "base64" | Vector encoding. |
user | string | Optional end-user identifier. |
Response
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, "…"] }
],
"model": "brahma-embedding-small",
"usage": { "prompt_tokens": 8, "total_tokens": 8 }
}
data[].index maps each result back to its input position. There are no output tokens, so total_tokens equals prompt_tokens.
Example
curl https://api.stage.peachdeskai.com/api/v1/voice-engine/embeddings/v1/embeddings \
-H "X-API-Key: $PEACHDESK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "brahma-embedding-small",
"input": ["candidate resume text", "job description text"],
"dimensions": 512
}'
Use-case guidance
- Search / RAG — embed documents once, embed the query at request time, rank by cosine similarity (equivalent to a dot product on these normalized vectors).
- Clustering — group documents by embedding distance.
- Recommendations / dedup — rank or match items by nearest embeddings.
brahma-embedding-small for cost-sensitive, high-volume workloads; brahma-embedding-large (or -small at full dimensions) when retrieval quality matters most.
brahma-embedding-small and brahma-embedding-large each run on their own scale-to-zero GPU endpoint, so the two sizes scale independently — heavy -large traffic never slows -small, and either can sit idle at $0 without affecting the other. Selecting the model automatically routes your request to the right plane; the request and response schema is identical for both. The first request to a plane after an idle period may take a few extra seconds while a worker warms, then responds in well under a second.Authorizations
SessionAuthApiKeyAuth
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Body
application/json
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.
Example:
"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.
Example:
"brahma-embedding-small"
Truncate the returned vectors to this many dimensions (the BRAHMA embedding models are MRL).
Available options:
float, base64 Response
Successful Response

