Core concepts
Embeddings
Vectorize text for search, clustering, and RAG, OpenAI-compatible /v1/embeddings.
POST
https://api.rodiumai.io/v1/embeddingsUse client.embeddings.create with a RodiumAi base_url. Input can be a string or an array of strings.
Choosing a model
Start with openai/text-embedding-3-small for cost-efficient retrieval. Confirm availability via GET /v1/models.
When to use
- RAG: chunk docs, embed, store vectors, retrieve top-k.
- Batch many strings in one request (input: string[]).
- Semantic search / dedupe without a full LLM call.
Recipes
Minimal RAG
Chunk → embeddings.create → store vectors → cosine top-k → chat with retrieved context.
Note: Keep chunk size stable so distances stay comparable.
Batch inputs
Pass input as an array of strings to embed many chunks in one call.
Note: Watch TPM / RODI quotes on large batches.
Model choice
text-embedding-3-small for cost; larger models when recall quality matters more.
Note: Do not mix embedding models in the same vector index.
Examples
…Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Embedding model id (e.g. openai/text-embedding-3-small). |
| input | string | array | Required | Text or array of texts to embed. |