models/BAAI/Bge-M3
BAAI

Bge-M3

embedding
Compare

Multi-Functionality, Multi-Linguality, and Multi-Granularity embeddings model.

MODALITIES
embedding
INPUT
$0.012 /1M
OUTPUT
$0 /1M
CONTEXT
60K tok
USAGE
9.8B
0.1% market share
RELEASED
2024-05-22

Bge-M3 (baai/bge-m3) is a embedding model from BAAI, released 2024-05-22. Context window: 60,000 tokens; max output . Pricing via AIgateway: input $0.012/M tokens, output $0/M tokens. Call it via https://api.aigateway.sh/v1/embeddings — set model="baai/bge-m3". Best for: RAG, Semantic search, Clustering.

model · baai/bge-m3family · BGE

Use this model

model: baai/bge-m3
curl https://api.aigateway.sh/v1/embeddings \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"baai/bge-m3","input":"the quick brown fox"}'

Capabilities

CONTEXT
60,000 tok

Strengths

  • Multi-lingual (100+ languages)
  • Strong on retrieval
  • Open-weight

Use cases

RAGSemantic searchClustering

Adoption

9.8B tokens
9.2M requests · 0.1% of tracked market volume
See the full leaderboard →
Aggregate usage across the open model ecosystem (as of 2026-05-30).

Pricing

Input$0.012 / 1M tokens
Output$0 / 1M tokens
1024-dim · multi-lingual
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-M3 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-m3",
  "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-m3",
  "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-m3", 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-M3?
Multi-Functionality, Multi-Linguality, and Multi-Granularity embeddings model. It is a embedding model from BAAI, accessible via AIgateway's OpenAI-compatible API at slug baai/bge-m3.
How much does Bge-M3 cost via AIgateway?
Input costs $0.012 per 1M tokens; output costs $0.000 per 1M tokens. Pass-through plus a 5% platform fee applied at top-up, not per call.
What is the context window of Bge-M3?
60,000 tokens.
How do I call Bge-M3 from my code?
Point the OpenAI SDK at https://api.aigateway.sh/v1 with your AIgateway key and set model to "baai/bge-m3". The request and response shapes match OpenAI exactly.
Does Bge-M3 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-M3?
RAG, Semantic search, Clustering. Key strengths: Multi-lingual (100+ languages); Strong on retrieval; Open-weight.
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.