Semantic search and embeddings
Search your own content by meaning and build grounded answers with TokenRex vector embeddings.
By Apirex Team · Updated · Sources checked

How embeddings work
An embedding model converts text into a numeric vector. Similar meanings tend to produce nearby vectors. Unlike a chat model, it does not generate an answer. Use embeddings for semantic search, recommendations, duplicate detection or retrieving evidence for a document assistant.
Index and retrieve
- Split documents into coherent passages and keep each passage’s source and access permissions.
- Create embeddings through POST /embeddings and save vectors with their source text in suitable storage.
- Embed the user’s question using the same compatible model and dimensions.
- Find nearby vectors, filtering results by the user’s permissions.
- Return matching passages, or send them to a chat model with instructions to answer only from that evidence.
Dimensions and model changes
The endpoint accepts supported dimensions and encoding options. A vector index expects a consistent dimension and representation. Switching models may require re-embedding existing documents and rebuilding the index; it is not just changing the query model name.
RAG and privacy
Retrieval-augmented generation combines search with a chat answer. Retrieved content does not eliminate hallucinations, so cite the source, allow an “I do not know” answer and test questions outside the collection. Enforce document access before retrieval and before returning excerpts. Embedding private text still sends it to the AI service; follow your organization’s data rules.
{
"model": "text-embedding-3-small",
"input": "Returns are accepted within 14 days."
}Billing
Embedding models usually charge for input tokens, not generated text. Building an initial index and querying it both use AI; retrieving already stored vectors is your search system’s work. Reuse embeddings for unchanged documents where appropriate.
Embeddings models
Loading the live catalog…
Prices are estimates converted from TokenRex’s listed rates at ₹96 per US dollar and $0.30 per Rex credit. Actual requests follow reported usage and rounding. Token, character, image and duration prices are different units; compare within the same task. Catalog availability does not mean every feature is connected in your app.
Open TokenRex’s model catalog