Skip to content

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

FieldTypeRequiredDescription
modelstringEmbedding model (e.g. veriEmbedding)
inputstring | arrayText or list of texts to embed
encoding_formatstringfloat (default) or base64
dimensionsintegerDesired 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 }
}
FieldDescription
data[].embeddingFloat vector
data[].indexPosition in the input
usageToken usage

TIP

To build end-to-end RAG with embedding + search + reranking, see the RAG guide.

Qevron — AI gateway. Arpanet / OpenAI / Anthropic / Gemini compatible.