Embeddings
Generate vector embeddings from input text using our embedding models.
Endpoint
Section titled “Endpoint”POST /v1/embeddingsRequest Body
Section titled “Request Body”| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID to use (e.g., bge-m3) |
input | string/array | Yes | Text to embed (string or array of strings) |
encoding_format | string | No | float (default) or base64 |
Example Request
Section titled “Example Request”Single Input
Section titled “Single Input”curl https://api.solidrust.ai/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "bge-m3", "input": "What is semantic search?" }'Batch Input
Section titled “Batch Input”curl https://api.solidrust.ai/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "bge-m3", "input": [ "First document to embed", "Second document to embed", "Third document to embed" ] }'Response
Section titled “Response”{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0023, -0.0047, 0.0112, ...] } ], "model": "bge-m3", "usage": { "prompt_tokens": 8, "total_tokens": 8 }}Embedding Dimensions
Section titled “Embedding Dimensions”| Model | Dimensions | Description |
|---|---|---|
bge-m3 | 1024 | Multilingual, high-quality embeddings |
Use Cases
Section titled “Use Cases”- Semantic Search - Find similar documents by meaning
- RAG Applications - Retrieve relevant context for LLM prompts
- Clustering - Group related content together
- Classification - Use embeddings as features for ML models
Best Practices
Section titled “Best Practices”Related
Section titled “Related”- RAG Guide - Building retrieval-augmented generation systems
- Document Q&A Example - Complete RAG implementation