Use Case · RAG Retrieval & Reranking

RAG Embeddings and Reranking API: One Key for Vector Search, Rerank, and Generation

Connect text embeddings (/v1/embeddings), document reranking (/v1/rerank), and chat generation (/v1/chat/completions) through one Infistar API key across BAAI BGE, Qwen, and Zhipu GLM models.

Production RAG pipelines combine indexing embeddings, relevance rerankers, and answer-generation LLMs. Infistar unifies OpenAI-compatible embeddings, Jina-compatible reranking, and chat endpoints under one wallet and billing log.

Complete RAG stack on one API gateway

Multilingual and Chinese-strong embeddings

Includes BAAI BGE-M3, BGE-Large, Alibaba Qwen Embedding, and Zhipu GLM embedding models.

Dedicated reranking endpoint

POST /v1/rerank returns index and relevance_score per candidate passage to sharpen retrieval precision before generation.

Single balance across retrieval and synthesis

Track embedding, reranking, and LLM generation charges together in one account usage ledger.

Production RAG quickstart documentation

Follow our end-to-end guide covering vector indexing, tenant permission filtering, and error handling.

Build a RAG pipeline in four steps

  1. Choose an embedding model (such as baai-bge-m3) and a reranker from the Embedding & Reranking catalog.
  2. Call POST /v1/embeddings during document ingestion and store vectors alongside tenant access metadata.
  3. Retrieve top candidates at query time, then call POST /v1/rerank to rank passages by relevance_score.
  4. Pass the highest-scoring passages to /v1/chat/completions or /v1/responses to produce grounded answers.

Engineering notes

  • Embeddings and reranking use dedicated request formats; switching embedding models requires re-indexing stored vectors.
  • Enforce tenant document permissions in your vector store before passing passages to the LLM.
  • Batch ingestion requests with controlled concurrency and backoff on HTTP 429 responses.

Related retrieval models and guides