Skip to main content
POST
/
embeddings
Embeddings
curl --request POST \
  --url https://api.euron.one/api/v1/euri/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": {},
  "dimensions": 123,
  "encoding_format": "<string>",
  "user": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.euri.ai/llms.txt

Use this file to discover all available pages before exploring further.

Request

POST https://api.euron.one/api/v1/euri/embeddings

Body parameters

model
string
required
Embedding model ID. Options: text-embedding-3-small, togethercomputer/m2-bert-80M-32k-retrieval, gemini-embedding-001, gemini-embedding-2-preview.
input
string | array
required
Text to embed. Can be a single string or an array of strings.
dimensions
integer
Number of dimensions for the output vector. Supported by models trained with Matryoshka Representation Learning (MRL): text-embedding-3-small (up to 1536), gemini-embedding-001 and gemini-embedding-2-preview (128–3072, recommended: 768, 1536, 3072). If omitted, the model’s default is used.
encoding_format
string
Format of the embedding. Options: "float" (default), "base64".
user
string
A unique identifier for the end-user, used for abuse monitoring.

Examples

curl -X POST https://api.euron.one/api/v1/euri/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_EURI_API_KEY" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "The quick brown fox jumps over the lazy dog."
  }'

Gemini Embedding 2 with custom dimensions

gemini-embedding-2-preview is a premium model. It requires wallet balance. It is Google’s first multimodal embedding model with 8K token input and 3072-dimensional vectors with Matryoshka support.
curl -X POST https://api.euron.one/api/v1/euri/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_EURI_API_KEY" \
  -d '{
    "model": "gemini-embedding-2-preview",
    "input": "Semantic search with multimodal embeddings",
    "dimensions": 768
  }'

Batch embeddings

curl -X POST https://api.euron.one/api/v1/euri/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_EURI_API_KEY" \
  -d '{
    "model": "gemini-embedding-2-preview",
    "input": [
      "First document text",
      "Second document text",
      "Third document text"
    ],
    "dimensions": 1536
  }'

Model comparison

ModelProviderPremiumMax inputDefault dimsCustom dimsPrice ($/M tokens)
text-embedding-3-smallOpenAINo8,1911,536Up to 1,536$0.02
togethercomputer/m2-bert-80M-32k-retrievalTogetherNo32,768768Fixed (768)$0.008
gemini-embedding-001GoogleNo2,0483,072128–3,072$0.15
gemini-embedding-2-previewGoogleYes8,1923,072128–3,072$0.20
For gemini-embedding-001 and gemini-embedding-2-preview, the default 3072-dimensional output is already normalized. For smaller dimensions (768, 1536), normalize the output vectors yourself (L2 norm) for best cosine similarity results.

Response

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0023064255, -0.009327292, 0.015797347, ...]
    }
  ],
  "model": "gemini-embedding-2-preview",
  "usage": {
    "prompt_tokens": 10,
    "total_tokens": 10
  }
}