Qwen3 Embedding 8B API
New32K context · Released Jun 5, 2025 · By Alibaba · Apache 2.0
Qwen3 Embedding 8B costs $0.03 per 1M tokens, against an official rate of $0.05 — 40% below official pricing. It is a Alibaba model under the Apache 2.0 licence, with a 32K context window, callable through an OpenAI-compatible endpoint with the model id `qwen/qwen3-embedding-8b`.
Input
$0.030/M
$0.050/M
Billing
per 1M tokens
no per-job minimum
Savings
40%
off official
- No markup
- OpenAI SDK compatible
- No minimum spend
- Apache 2.0
The strongest open-weight retrieval model available, and trained for Matryoshka truncation — ask for 1024 dimensions instead of 4096 and the vector is still usable, at a quarter of the storage.
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="qwen/qwen3-embedding-8b",
messages=[{"role": "user", "content": "Hello"}]
)
Qwen3 Embedding 8B 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.030/M | — |
| Official (Alibaba) | $0.050/M | — |
| OpenRouter | $0.048/M | — |
| DeepInfra | $0.035/M | — |
| Together AI | $0.046/M | — |
What it's good at
- Retrieval-augmented generation over large corpora
- Multilingual semantic search
- Deduplication and clustering at scale
Other embedding models
Qwen3 Embedding 8B questions
Every figure below is read from the same catalogue entry as the table above, so the two cannot disagree.
What does Qwen3 Embedding 8B cost on AI Token Router, and what is the official rate?
Qwen3 Embedding 8B is billed at $0.030 per 1M tokens here, against Alibaba's official $0.050 — 40% below, or $0.020 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 Qwen3 Embedding 8B right now?
Yes. A request naming `qwen/qwen3-embedding-8b` reaches a live upstream today and is billed at the rates above. 7 of the 24 models in this catalogue are callable right now; the rest are listed at their intended price and marked unavailable on their own pages, so you find that out here rather than from an error at call time.
How many dimensions do Qwen3 Embedding 8B vectors have, and how much text fits in one request?
4,096 dimensions per vector, with up to 32,768 tokens (32K) of input in a single request. Dimension count is what decides your storage bill rather than ours: a million 4,096-dimension vectors at four bytes per float is roughly 16.4 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 Qwen3 Embedding 8B?
No. Embedding models are billed on input tokens only, at $0.030 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 Qwen3 Embedding 8B?
Call `embeddings.create` on an OpenAI SDK pointed at `https://router.xark.io/api/v1`, with `model="qwen/qwen3-embedding-8b"` 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 `qwen3-embedding-8b`, without the provider prefix, resolves to the same model.
What licence is Qwen3 Embedding 8B under, and can I use it commercially?
Qwen3 Embedding 8B is published by Alibaba under the Apache 2.0 licence. Apache 2.0 is a standard permissive licence: commercial use, modification and redistribution are allowed, subject to keeping the notices and stating what you changed. It also carries an explicit patent grant from the contributors, which terminates if you bring a patent claim over the work — that grant is usually the reason a legal team prefers it to MIT. No user threshold and no field-of-use restriction apply.
How does Qwen3 Embedding 8B pricing here compare with other providers carrying it?
Of the 3 other providers we track carrying Qwen3 Embedding 8B, the lowest is DeepInfra at $0.035/M, against our $0.030/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 Alibaba's official $0.050/M. If you find one of these figures stale, tell us and we will correct it.