Text-Embedding-v4

Text-Embedding-v4
Alibaba Cloud · Embedding
POST /v1/chat/completions

Alibaba’s flagship text embedding model. Part of the Qwen3-Embedding series. Supports 100+ major languages with custom output dimensions (64 to 2048). Up to 8,192 tokens per input, batch size of 10. Ideal for semantic search, recommendations, clustering, classification, and anomaly detection.

At a glance

FieldValue
Model idtext-embedding-v4
Input modalitiestext
Output modalitiesembedding
Context window8192
RegionSingapore
Featurescustom dimensions, sparse vectors, task instructions, batch
NewYes
Native inferenceNo
Supported endpointsPOST /v1/embeddings

Pricing

ChargeSpecRate
Input tokensper 1M$0.07

Example request

$curl https://api.empiriolabs.ai/v1/chat/completions \
> -H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
> -H 'Content-Type: application/json' \
> -d '{"model": "text-embedding-v4", "messages": [{"role":"user","content":"Hello"}]}'

Parameters

ParameterTypeRequiredDefaultDescription
inputstringyesSingle string or array of strings to embed (max 10 entries, 8192 tokens each).
dimensionsnumberno1024Vector dimension. 1024 is the recommended default; higher = more semantic info, more storage. · Range: 64 – 2048 · Allowed: 2048, 1536, 1024, 768, 512, 256, 128, 64
encoding_formatenumno"float"Allowed: float, base64
userstringnoOptional caller identifier passed through to upstream.

Notes

Embedding dimensions (selectable per request)

  • 64, 128, 256, 512, 768, 1024 (default), 1536, 2048
  • Higher = more semantic info, more storage cost

Batch limits

  • Up to 10 inputs per request
  • Each input up to 8,192 tokens

Languages

  • 100+ major languages including Chinese, English, Spanish, French, Japanese, Korean, German, Russian
  • Multiple programming languages also supported

Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/text-embedding-v4.