Skip to main content
POST
/
v1
/
embeddings
curl https://gateway.bud.studio/v1/embeddings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "Machine learning is transforming industries",
    "dimensions": 1536,
    "priority": "normal"
  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.0023064255, -0.009327292, ...],
      "index": 0
    }
  ],
  "model": "text-embedding-3-small",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}
curl https://gateway.bud.studio/v1/embeddings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "Machine learning is transforming industries",
    "dimensions": 1536,
    "priority": "normal"
  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.0023064255, -0.009327292, ...],
      "index": 0
    }
  ],
  "model": "text-embedding-3-small",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer authentication header of the form Bearer <token> where <token> is your API key

Body

ParameterTypeRequiredDescription
modelstringYesEmbedding model identifier
inputstring or arrayYesText(s) to embed. Can be a single string or array of strings
encoding_formatstringNoFormat of the embedding. Options: float, base64. Default: float
dimensionsintegerNoMatryoshka dimensions for output embeddings. Default: model’s full dimensions
modalitystringNoModality type: text, image, audio. Default: text
prioritystringNoPriority level: high, normal, low. Default: normal
include_inputbooleanNoInclude original input text in response. Default: false
chunkingobjectNoChunking configuration for long texts (see Chunking Configuration below)

Chunking Configuration

The chunking parameter accepts an object with the following fields:
ParameterTypeDescription
enabledbooleanEnable text chunking. Default: false
strategystringChunking strategy: token, sentence, recursive, semantic, code, table. Default: token
chunk_sizeintegerMax tokens per chunk (1-8192). Default: 512
chunk_overlapintegerToken overlap between chunks. Default: 0
tokenizerstringTokenizer: cl100k_base, p50k_base, r50k_base, gpt2. Default: cl100k_base
min_sentencesinteger[sentence strategy] Minimum sentences per chunk. Default: 1

Supported Providers

OpenAI

text-embedding-3-small, text-embedding-3-large, ada-002

Azure OpenAI

Enterprise text embeddings with global availability

Cohere

embed-english-v3.0, embed-multilingual-v3.0

Voyage AI

voyage-2, voyage-code-2 specialized embeddings

Together AI

Nomic Embed and open-source embedding models

Google

text-embedding-004 and multimodal embeddings