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/embeddings

Send 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

MethodEndpointDescription
POST/v1/embeddingsCreate 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": "..." } }
Statuserror.typeMeaning
400invalid_request_errorSchema violation.
401authentication_errorMissing or invalid API key.
402billing_errorAccount out of credit or hit a spend limit.
429rate_limit_errorRPM or TPM exceeded. Respect Retry-After.
500internal_server_errorUnexpected gateway failure.