Search and RAG (retrieval-augmented generation, where a chatbot first fetches relevant text and then answers from it) both start with embeddings. At $0.02 per million tokens, the embedding bill is rarely what hurts. The size of the vectors you store and the way you phrase each query matter more. So what does Qwen3-Embedding-8B cost to run, and which settings should you choose?
What Qwen3-Embedding-8B is and what it costs on Lyceum
Qwen3-Embedding-8B is a dense model with 8B parameters, released by Qwen on 5 June 2025 under the Apache 2.0 licence. Dense means every parameter works on every token. It reads text in over 100 languages, including programming languages. Its context window (the amount of text it reads in one request) is 32K tokens.
The model returns a vector of up to 4,096 numbers for each text. You can also ask for a shorter vector, anywhere from 32 to 4,096 numbers. Qwen describes the model family in its technical report.
We bill it per token, with no base fee. These are the prices on our Qwen3-Embedding-8B model page, read on 23 October 2026:
| Token type | Price per 1M tokens |
|---|---|
| Input | $0.02 |
| Cached input | $0.00 |
| Output | none, input only |
An embedding model writes no text, so you only pay for what you send. The model page lists its processing region as EU-hosted.
How to call Qwen3-Embedding-8B with the OpenAI SDK
Lyceum is a sovereign European AI inference provider for open-source models. The company and its GPUs are in Europe, and our serverless models run in Paris and Finland. You reach the model through our serverless inference API. It speaks the OpenAI format and bills per token, with no servers to manage. Point the OpenAI SDK at our base URL and call the embeddings endpoint.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["LYCEUM_API_KEY"],
base_url="https://api.lyceum.technology/openai/v1",
)
response = client.embeddings.create(
model="qwen/qwen3-embedding-8b",
input=["First chunk of text.", "Second chunk of text."],
dimensions=1024,
)
print(len(response.data), len(response.data[0].embedding))We ran test calls against our API on 23 October 2026. Without `dimensions`, each vector had 4,096 numbers. With `dimensions=1024`, it had 1,024 numbers and length 1, so cosine similarity works on it directly. Cosine similarity is the usual score for how close two vectors point, from -1 to 1.
One request took 16 texts and returned 16 vectors. A single short text came back in a median of 0.44 seconds over 10 calls, network included. Our serverless docs spell the model ID as Qwen/Qwen3-Embedding-8B. Both spellings worked in our test, and the API answered with qwen/qwen3-embedding-8b.
What a search index costs: a worked example
Take a hypothetical support team with 200,000 text chunks of 500 tokens each. A chunk is one piece of a longer document, embedded on its own. They answer 1 million questions a month. Each question becomes a 27-token query once the instruction is added, as counted in our test calls.
index, once: 200,000 chunks x 500 tokens = 100M tokens x $0.02 per 1M = $2.00
queries/month: 1,000,000 x 27 tokens = 27M tokens x $0.02 per 1M = $0.54
storage, float32 (4 bytes per number):
4,096 numbers: 200,000 x 4,096 x 4 bytes = 3.28 GB
1,024 numbers: 200,000 x 1,024 x 4 bytes = 0.82 GB
256 numbers: 200,000 x 256 x 4 bytes = 0.20 GBBuilding the whole index costs $2.00, and a month of questions costs $0.54. The example does not include the price of the vector database itself. The vector size changes the storage by a factor of 16. That storage sits in your vector database, the system that stores vectors and finds the closest ones.
Fireworks lists Qwen3 Embedding 8B on its serverless API at $0.10 per 1M input tokens, marked as a limited-time offer. OVHcloud AI Endpoints lists Qwen3-Embedding-8B at €0.10 per 1M tokens. We read both providers' own pages on 23 October 2026. At $0.10 per 1M tokens, the same index would cost $10.00.
Instructions and vector size: the two settings that matter
The model is instruction-aware: you can put one sentence before a query that says what the search is for. Qwen recommends it for queries and not for the documents you store. Its model card reports 1% to 5% better results on most tasks with an instruction. It also advises writing instructions in English, even for other languages.
Instruct: Given a question about a contract, retrieve the clause that answers it
Query: How long is the notice period?We tried this on four short texts in the same test calls. The question was English, and the matching clause was German. Without the instruction, the German clause scored 0.61 and the best unrelated text 0.42. With it, the clause scored 0.64 and the best unrelated text 0.31. Four texts show the effect only, not a measured gain.
Shorter vectors work because of Matryoshka Representation Learning (MRL). That training method encodes information at different granularities, so one vector can be cut to fit a smaller budget. In the same test at 1,024 and at 256 numbers, the matching clause still scored well above the unrelated texts. Test the size on your own queries before you build the index. Changing it later means embedding everything again.
Qwen3-Embedding-8B benchmarks from Qwen's model card
MTEB (Massive Text Embedding Benchmark) scores embedding models on many tasks and languages. These are Qwen's own numbers on the multilingual version, from its model card. Qwen also publishes its evaluation code on GitHub. Qwen says the 8B model ranked first on that leaderboard on 5 June 2025.
| Model | Mean (task) | Retrieval | Classification | Clustering | Bitext mining |
|---|---|---|---|---|---|
| Qwen3-Embedding-8B | 70.58 | 70.88 | 74.00 | 57.65 | 80.89 |
| Qwen3-Embedding-4B | 69.45 | 69.60 | 72.33 | 57.15 | 79.36 |
| Qwen3-Embedding-0.6B | 64.33 | 64.64 | 66.83 | 52.33 | 72.22 |
Retrieval measures finding the right passage for a query. Classification measures sorting texts into labels. Clustering measures grouping similar texts. Bitext mining measures matching a sentence with its translation. We serve the 8B model only. Run your own queries before you trust any leaderboard, because your documents are not the benchmark's.
When Qwen3-Embedding-8B is the right choice
Pick it when your search must work across languages or over code, and your chunks fit within 32K tokens. Choose your vector size first, because it is fixed once the index is built. You can change the query instruction later, but test again when you do. Then embed a sample of a few thousand chunks and check the results against questions you already know the answers to. Our status page shows live service status for our models.