Qwen Text Embedding v4 overview
Qwen Text Embedding v4 by Alibaba Cloud
Qwen Text Embedding v4 is a state-of-the-art multilingual embedding model optimized for semantic search and retrieval tasks.
Qwen Text Embedding v4 specs
- Model ID
alibaba/text-embedding-v4- Developer
- Alibaba Cloud
- Input
- Text
- Output
- Text
- Endpoint
POST https://api.aimlapi.com/v1/embeddings
Overview
Qwen Text Embedding v4 is a 4B-parameter dual-encoder model from the Qwen3 family, optimized specifically for dense embeddings and ranking tasks rather than general chat. It supports over 100 languages (including major programming languages) and is tuned for semantic search, retrieval, classification, clustering, and bitext mining in a single shared embedding space.
Technical Specifications
- Architecture: Dense transformer-based encoder with symmetric contrastive fine-tuning
- Capabilities: Multilingual semantic encoding, query/document alignment, cross-lingual retrieval, similarity ranking
- Training Data: Curated corpus spanning technical documentation, academic papers, conversational logs, and web-scale multilingual text with rigorous deduplication and bias mitigation
Performance Benchmarks
- MTEB (Massive Text Embedding Benchmark): Achieves top-tier performance among open and closed models, excelling in retrieval, classification, and clustering subtasks
- Multilingual Alignment: Maintains >92% cross-lingual similarity fidelity on aligned sentence pairs across major language families
Quality Improvements
- Semantic Density: Embeddings exhibit tighter intra-cluster cohesion and sharper inter-cluster separation compared to v3
- Noise Resilience: Robust to input perturbations, formatting inconsistencies, and moderate grammatical errors
- Bias Control: Integrated fairness-aware training reduces spurious correlations in gender, region, and domain-sensitive dimensions
New Features & Technical Upgrades
Qwen Text Embedding v4 introduces a suite of innovations focused on semantic fidelity, efficiency, and multilingual equity:
Key Features
- High Semantic Fidelity: Captures fine-grained semantic relationships, even in complex or domain-specific phrasing.
- Long-Context Awareness: Handles inputs up to 8K tokens, ideal for embedding full documents or detailed user queries.
- Multilingual Robustness: Unified embedding space across languages enables cross-lingual retrieval without translation.
- Optimized for Retrieval: Trained with contrastive and in-batch negative sampling for superior performance in similarity search.
- Low Latency & High Throughput: Efficient inference pipeline suitable for real-time applications at scale.
Practical Impact
These enhancements translate into stronger RAG accuracy, more coherent document clustering, and reduced false positives in semantic search, especially in multilingual support portals, research knowledge bases, and cross-border enterprise analytics.
Comparison with Other Models
vs OpenAI text-embedding-3-large: Qwen v4 matches or exceeds OpenAI’s performance on MTEB while offering 8K context (vs 8K for OpenAI, but with lower cost and data residency flexibility). Unlike OpenAI, Qwen provides transparent licensing for commercial deployment and avoids data usage for model training.
vs Google’s textembedding-gecko: Qwen v4 provides better zero-shot retrieval scores on BEIR and avoids vendor lock-in through open-weight availability. Gecko integrates tightly with Vertex AI, while Qwen offers greater deployment flexibility across clouds and on-prem.
Use cases
- Semantic Search: Enable meaning-based search in e-commerce, knowledge bases, and customer support.
- Recommendation Systems: Embed user queries and product descriptions into shared vector space.
- Duplicate Detection & Clustering: Group similar support tickets, news articles, or user reviews.
- Cross-Lingual Applications: Build multilingual chatbots or global search engines without per-language models.
Qwen Text Embedding v4 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.07 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
How to use the Qwen Text Embedding v4 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/embeddings' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "alibaba/text-embedding-v4",
"input": "The quick brown fox jumps over the lazy dog."
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "alibaba/text-embedding-v4",
"input": "The quick brown fox jumps over the lazy dog."
}
response = requests.post("https://api.aimlapi.com/v1/embeddings", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/embeddings", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "alibaba/text-embedding-v4",
"input": "The quick brown fox jumps over the lazy dog."
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Qwen Text Embedding v4 FAQ
What inputs and outputs does Qwen Text Embedding v4 support?
Qwen Text Embedding v4 takes text as input and returns embedding.
When was Qwen Text Embedding v4 released?
Qwen Text Embedding v4 became available on December 13, 2025.
How much does Qwen Text Embedding v4 cost?
Qwen Text Embedding v4 costs $0.07 per 1M input tokens on AI/ML API, billed as you go with no subscription.
Who created Qwen Text Embedding v4?
Qwen Text Embedding v4 was built by Alibaba Cloud.
How do I call Qwen Text Embedding v4 on AI/ML API?
Send a request to https://api.aimlapi.com/v1/embeddings with alibaba/text-embedding-v4 as the model id.
Is Qwen Text Embedding v4 available through a single API key?
Yes. Qwen Text Embedding v4 is served through AI/ML API, so the same key and endpoint format used for other models applies.
What range of embedding dimensions can I choose for Qwen Text Embedding v4?
Qwen Text Embedding v4 supports custom embedding dimensions ranging from 64 to 2048.
How many languages does Qwen Text Embedding v4 support?
Qwen Text Embedding v4 supports over 100 languages.
Is Qwen Text Embedding v4 part of the Qwen3-Embedding series?
Yes, it belongs to the Qwen3-Embedding series from Alibaba Cloud.
What tasks is Qwen Text Embedding v4 designed for?
It is designed for semantic search, clustering, and classification tasks.