Embeddings
Endpoint
Section titled “Endpoint”POST https://api.bve.me/v1/embeddingsRequires Authorization: Bearer sk-bve-YOUR_KEY.
This endpoint proxies directly to Fuelix /embeddings. The request body and response shape follow the OpenAI Embeddings API.
Request body
Section titled “Request body”{ "model": "text-embedding-3-small", "input": "The quick brown fox"}| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Embedding model ID |
input | string | array | Yes | Text to embed |
encoding_format | string | No | float or base64 (default: float) |
dimensions | integer | No | Output dimensions (model-dependent) |
user | string | No | End-user identifier |
Response
Section titled “Response”{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0023, -0.0089, 0.0141, ...] } ], "model": "text-embedding-3-small", "usage": { "prompt_tokens": 6, "total_tokens": 6 }}cURL example
Section titled “cURL example”curl https://api.bve.me/v1/embeddings \ -H "Authorization: Bearer sk-bve-YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "text-embedding-3-small", "input": "The quick brown fox" }'OpenAI SDK
Section titled “OpenAI SDK”import OpenAI from 'openai';
const client = new OpenAI({ apiKey: 'sk-bve-YOUR_KEY', baseURL: 'https://api.bve.me/v1',});
const response = await client.embeddings.create({ model: 'text-embedding-3-small', input: 'The quick brown fox',});
console.log(response.data[0].embedding);Headers
Section titled “Headers”| Header | Description |
|---|---|
X-Request-Id | UUID for this request |
X-BVE-Latency | Gateway latency in milliseconds |