models/BAAI/BGE Reranker Base
BAAI

BGE Reranker Base

rerank
Compare

Paired with bge-m3 for two-stage retrieval: recall with embeddings, precision with this reranker.

MODALITIES
embedding

BGE Reranker Base (baai/bge-reranker-base) is a rerank model from BAAI. Context window: tokens; max output . Pricing via AIgateway: $0.0000 per request. Call it via https://api.aigateway.sh/v1/rerank — set model="baai/bge-reranker-base". Best for: RAG reranking, Search result reordering.

model · baai/bge-reranker-basefamily · BGE

Use this model

model: baai/bge-reranker-base
curl https://api.aigateway.sh/v1/rerank \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"baai/bge-reranker-base","query":"weather","documents":["sun is bright","mars is red"]}'

Capabilities

Strengths

  • Strong cross-encoder reranking
  • Open-weight
  • Near-free

Use cases

RAG rerankingSearch result reordering

Pricing

Per request$0.0000
Open-weight
You pay pass-through · 5% applied at credit top-up, not per-call.
See API example →CompareAPI referenceSee usage ranking →

Collections

More embedding models →More from BAAIFrontier models →Free-tier models →
API schema

Call BGE Reranker Base from any OpenAI SDK

POST https://api.aigateway.sh/v1/embeddings·Content-Type: application/json·Auth: Bearer sk-aig-...

Request body

json
{
  "model": "baai/bge-reranker-base",
  "input": "Text to embed, or an array of strings for batch."
}

Response

json
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0123, -0.0456, 0.0789, /* ... */]
    }
  ],
  "model": "baai/bge-reranker-base",
  "usage": { "prompt_tokens": 5, "total_tokens": 5 }
}

Quickstart

from openai import OpenAI
client = OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-...")

r = client.embeddings.create(model="baai/bge-reranker-base", input="hello world")
print(r.data[0].embedding[:5])

Errors

401authentication_errorInvalid or missing API key
402insufficient_creditsWallet empty (PAYG only)
404not_foundUnknown model or endpoint
429rate_limit_errorOver per-minute limit — see Retry-After header
500server_errorUpstream provider failed (retryable)
503service_unavailableUpstream saturated (retryable)
Full docs →API reference →OpenAPI spec →llms.txt →

Frequently asked questions

What is BGE Reranker Base?
Paired with bge-m3 for two-stage retrieval: recall with embeddings, precision with this reranker. It is a rerank model from BAAI, accessible via AIgateway's OpenAI-compatible API at slug baai/bge-reranker-base.
How much does BGE Reranker Base cost via AIgateway?
Pass-through pricing plus a 5% platform fee applied at top-up. See the pricing panel on this page for exact rates.
How do I call BGE Reranker Base from my code?
Point the OpenAI SDK at https://api.aigateway.sh/v1 with your AIgateway key and set model to "baai/bge-reranker-base". The request and response shapes match OpenAI exactly.
Does BGE Reranker Base support streaming, tool calling, vision, and JSON mode?
Streaming — no. Tool calling — no. Vision — no. JSON mode — no. Prompt caching — no.
What are the best use cases for BGE Reranker Base?
RAG reranking, Search result reordering. Key strengths: Strong cross-encoder reranking; Open-weight; Near-free.
Can I bring my own BAAI API key (BYOK)?
Yes. Attach a BAAI key in your AIgateway dashboard and this model flips to pass-through — you pay BAAI directly and AIgateway waives the 5% platform fee on those calls.