Embeddings
Turn text into vector representations for semantic search and clustering.
The Embeddings API turns text into dense vector representations that you can
store in a vector database and search by cosine similarity. It mirrors
OpenAI's embeddings.create so any official OpenAI SDK works out of the
box - just point baseURL at https://api.aivene.com/v1.
POST /v1/embeddingsSend a string or array of strings and get back an array of float vectors.
Use dimensions to truncate output for models that support Matryoshka
representation.
What you can do
- Semantic search - find documents similar to a query by cosine similarity.
- Clustering - group similar texts together using k-means or hierarchical clustering.
- Classification - use embeddings as features for ML models.
- RAG pipelines - retrieve relevant context before prompting an LLM.
Browse available models at Models.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/embeddings | Create embeddings |
Every endpoint expects a bearer token in the Authorization header.
Create keys at Manage API Keys.
Errors
All errors follow the OpenAI structured shape:
{ "error": { "type": "invalid_request_error", "message": "..." } }| Status | error.type | Meaning |
|---|---|---|
400 | invalid_request_error | Schema violation. |
401 | authentication_error | Missing or invalid API key. |
402 | billing_error | Account out of credit or hit a spend limit. |
429 | rate_limit_error | RPM or TPM exceeded. Respect Retry-After. |
500 | internal_server_error | Unexpected gateway failure. |