POST
Proxy Embeddings
Generate vector embeddings with your organization’s self-hosted BRAHMA embedding models. 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

Both are multilingual (English, Hindi, and other Indian + European languages) and support Matryoshka dimension shortening: pass dimensions to get a shorter, already-normalized vector that trades a little accuracy for smaller storage and faster similarity math.

Request fields

Response

data[].index maps each result back to its input position. There are no output tokens, so total_tokens equals prompt_tokens.

Example

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.
Choose 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

Authorization
string
header
required

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.

input
required

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
string

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"

dimensions
integer

Truncate the returned vectors to this many dimensions (the BRAHMA embedding models are MRL).

encoding_format
enum<string>
default:float
Available options:
float,
base64

Response

Successful Response