Are you an LLM? You can read better optimized documentation at /en/api/embeddings.md for this page in Markdown format
Embeddings
Turns text into an array of numbers (a vector) that represents its meaning. These vectors are the foundation of semantic search, recommendations and RAG systems.
POST/v1/embeddings
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | Embedding model (e.g. veriEmbedding) |
input | string | array | ✓ | Text or list of texts to embed |
encoding_format | string | float (default) or base64 | |
dimensions | integer | Desired vector size (if the model supports it) |
Example
bash
curl https://app.qevron.ai/v1/embeddings \
-H "Authorization: Bearer $QEVRON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veriEmbedding",
"input": "Qevron is an AI gateway."
}'python
resp = client.embeddings.create(
model="veriEmbedding",
input="Qevron is an AI gateway.",
)
vector = resp.data[0].embedding
print(len(vector), "dimensional vector")javascript
const resp = await client.embeddings.create({
model: "veriEmbedding",
input: "Qevron is an AI gateway.",
});
console.log(resp.data[0].embedding.length, "dimensional vector");To embed multiple texts in one request, pass an array to input:
json
{ "model": "veriEmbedding", "input": ["first text", "second text"] }Response
json
{
"object": "list",
"model": "veriEmbedding",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, 0.0789, "..."] }
],
"usage": { "prompt_tokens": 9, "total_tokens": 9 }
}| Field | Description |
|---|---|
data[].embedding | Float vector |
data[].index | Position in the input |
usage | Token usage |
TIP
To build end-to-end RAG with embedding + search + reranking, see the RAG guide.