Qwen Text Embedding v4 API

alibaba/qwen-text-embedding-v4
Alibaba's multilingual embedding model — configurable output dimensions (64–2048) across 100+ languages, tuned for semantic search and RAG.
Context
8K tokens
Input
$0.091 / 1M tokens
Output
Released
Dec 13, 2025

Overview

What Is Qwen Text Embedding v4 API?

Qwen Text Embedding v4 is Alibaba Cloud’s text embedding model for semantic search, RAG, clustering, and related text retrieval tasks. It is described as a multilingual model in the Qwen3-Embedding series, with support for 100+ languages.

Technical Reference

DeveloperAlibaba Cloud
Model IDalibaba/qwen-text-embedding-v4
Release DateDecember 12, 2025
Context Window8,192 tokens (~8K)
ModalitiesText → Embedding

What Qwen Text Embedding v4 Brings to the Table

Multilingual embedding model
The model supports 100+ languages, including Chinese, English, Spanish, French, Portuguese, Indonesian, Japanese, Korean, German, and Russian.

Embedding dimensions
Alibaba Cloud documents list selectable dimensions of 2,048, 1,536, 1,024, 768, 512, 256, 128, or 64, with 1,024 marked as the default in the model studio documentation.

Text-focused input and output
The Chinese model information page lists the input modality as Text and the output modality as Text.

Improved retrieval quality over v3
The model is described as improving performance over Qwen embedding v3, with tighter intra-cluster cohesion and sharper inter-cluster separation, and better results on retrieval-related evaluations.

Part of Qwen3-Embedding
Alibaba Cloud documentation identifies text-embedding-v4 as part of the Qwen3-Embedding series.

API Pricing

  • Input: $0.091 / 1M tokens

Where Qwen Text Embedding v4 Makes the Most Sense

Semantic search
The model is recommended for text search and semantic search workflows.

RAG
Documentation lists it as suitable for retrieval-augmented generation use cases.

Clustering
Qwen Cloud explicitly lists clustering as a use case for text-embedding-v4.

Classification
Alibaba Cloud documentation says it covers most text processing scenarios, including use cases that benefit from stronger text representations such as classification.

Qwen Text Embedding v4 vs the Alternatives

Qwen Text Embedding v3
Alibaba’s documentation says v4 improves on v3, including better intra-cluster cohesion and inter-cluster separation.

Sources: https://docs.aimlapi.com/api-references/embedding-models/alibaba-cloud/qwen-text-embedding-v4 · https://help.apiyi.com/en/text-embedding-v4-vector-dimensions-guide-en.html · https://help.aliyun.com/en/model-studio/embedding

Uptime and performance

  • Uptime (24h): 100%
  • Uptime (7d): 100%
  • Availability (24h): 97.0%
  • Error rate (24h): 3.0%
  • End-to-end latency (24h median): 547ms

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.

Use cases

Text-embedding-v4 is documented as suitable for text retrieval, including semantic search and RAG workflows.

It is also suited to clustering, where text items are grouped by similarity for analysis or organization.

The model is documented for classification tasks, where embeddings are used to assign text to categories.

Alibaba Cloud also says it can be used for code retrieval and code snippet vectorization performance improvements in knowledge base and embedding workflows.

How to use Qwen Text Embedding v4 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to alibaba/qwen-text-embedding-v4.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/embeddings",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "alibaba/qwen-text-embedding-v4",
      "input": "The quick brown fox"
    },
)
print(r.json())
const r = 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/qwen-text-embedding-v4",
    "input": "The quick brown fox"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/embeddings \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"alibaba/qwen-text-embedding-v4","input":"The quick brown fox"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Qwen Text Embedding v4 API Pricing

TypePrice
Input
$0.091 / 1M tokens
Output

Free quota: 1 million tokens, valid for 90 days from Model Studio activation, model release, or application approval, whichever is later.

Qwen Text Embedding v4 vs other models

ModelInputOutputContextBest for
$0.091 / 1M tokens
8K tokens
Semantic search and RAG
$0.091 / 1M tokens
$0.074 / 1M tokens
8K tokens
Semantic search + RAG
$0.091 / 1M tokens
$0.091 / 1M tokens
8K tokens
Semantic search + RAG

Frequently asked questions

Qwen Text Embedding v4 has a 8,192 tokens context window.

Qwen Text Embedding v4 takes text as input and returns embedding.

Qwen Text Embedding v4 became available on December 13, 2025.

Qwen Text Embedding v4 is priced at input $0.091 / 1M tokens.

Qwen Text Embedding v4 was built by Alibaba Cloud.

Send a request to https://api.aimlapi.com/v1/embeddings with alibaba/qwen-text-embedding-v4 as the model id.

Yes. Qwen Text Embedding v4 is served through AI/ML API, so the same key and endpoint format used for other models applies.

Qwen Text Embedding v4 supports custom output dimensions from 64 to 2048.

It supports more than 100 languages.

It is designed for semantic search, clustering, and classification tasks.

Start building with Qwen Text Embedding v4

Get API Key
1000+ models, one API.