BGE-M3 API
8K context · Released Jan 30, 2024 · By BAAI · MIT
BGE-M3 costs $0.012 per 1M tokens, against an official rate of $0.02 — 40% below official pricing. It is a BAAI model under the MIT licence, with a 8K context window, callable through an OpenAI-compatible endpoint with the model id `baai/bge-m3`. This model is listed for reference and is not currently served by an upstream provider, so requests for it return no available channel.
Not currently available. No configured upstream serves this model, so a request for it returns no available channel. The rate below is what it will cost when it is enabled.
Input
$0.012/M
$0.020/M
Billing
per 1M tokens
no per-job minimum
Savings
40%
off official
- No markup
- OpenAI SDK compatible
- No minimum spend
- MIT
The pragmatic default: 1024 dimensions, MIT-licensed, and cheap enough to embed an entire document store without a budget conversation.
Copy this and go
The model id is already filled in. Nothing in this snippet needs editing except your key.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://router.xark.io/api/v1" # ← the only line that changes
)
response = client.chat.completions.create(
model="baai/bge-m3",
messages=[{"role": "user", "content": "Hello"}]
)
BGE-M3 pricing across providers
Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.
| Provider | Input | Output |
|---|---|---|
| AI Token Router | $0.012/M | — |
| Official (BAAI) | $0.020/M | — |
| OpenRouter | Not offered | — |
| DeepInfra | $0.015/M | — |
| Together AI | $0.020/M | — |
What it's good at
- General-purpose vector search on a budget
- Long-document chunk embedding up to 8K tokens
- Self-hostable-later retrieval stacks
Other embedding models
BGE-M3 questions
Every figure below is read from the same catalogue entry as the table above, so the two cannot disagree.
What does BGE-M3 cost on AI Token Router, and what is the official rate?
BGE-M3 is billed at $0.012 per 1M tokens here, against BAAI's official $0.020 — 40% below, or $0.008 per 1M tokens back. There is no platform fee, no minimum spend and no per-job surcharge on top of that rate, and failed requests are not billed. The official figure is published next to ours because a discount with no stated benchmark is not a claim anyone can check.
Can I call BGE-M3 right now?
No. BGE-M3 is catalogued but not currently servable — no configured upstream provider carries it, so a request naming `baai/bge-m3` returns `no available channel` instead of a result. The rate on this page is what it will cost once an upstream serves it, not something you can spend today. The embedding models you can call today are Qwen3 Embedding 8B. 7 of the 24 catalogued models are callable, and every page says which it is.
How many dimensions do BGE-M3 vectors have, and how much text fits in one request?
1,024 dimensions per vector, with up to 8,192 tokens (8K) of input in a single request. Dimension count is what decides your storage bill rather than ours: a million 1,024-dimension vectors at four bytes per float is roughly 4.1 GB before any index overhead, so the vector database usually costs more to run than the embedding calls that filled it. Text longer than the input limit has to be chunked before you send it.
Is there an output charge on BGE-M3?
No. Embedding models are billed on input tokens only, at $0.012 per 1M tokens — there is no completion to charge for, so the vector you get back adds nothing to the bill. There is no cached-input rate on this model either — the text models publish one, embeddings have a single rate and it is the one above. The only variable is how many tokens you push through, which makes the cost of indexing a corpus a straight multiplication you can work out before you start rather than a figure you discover afterwards.
How do I embed text with BGE-M3?
Call `embeddings.create` on an OpenAI SDK pointed at `https://router.xark.io/api/v1`, with `model="baai/bge-m3"` and either a single string or an array of strings as `input` — the endpoint is `https://router.xark.io/api/v1/embeddings`. Batching many strings into one request is the same price as sending them separately, since billing is per input token, but it is far fewer round trips when you are indexing a corpus. The bare name `bge-m3`, without the provider prefix, resolves to the same model.
What licence is BGE-M3 under, and can I use it commercially?
BGE-M3 is published by BAAI under the MIT licence. MIT is a standard permissive licence: commercial use, modification and redistribution are all allowed, and the only obligation is to keep the copyright and licence notice with the software. It sets no user threshold, no field-of-use restriction and no separate acceptable-use policy, so there is nothing in it that limits what you build commercially on top of the output.
How does BGE-M3 pricing here compare with other providers carrying it?
Of the 2 other providers we track carrying BGE-M3, the lowest is DeepInfra at $0.015/M, against our $0.012/M. That is where the rates stood when we last reconciled them, and it can change without notice — we are not claiming to be the cheapest source for this model, only that our rate sits below BAAI's official $0.020/M. If you find one of these figures stale, tell us and we will correct it.