alibaba/text-embedding-v4
Alibaba Cloud Model Studio text-embedding-v4 is a Qwen3-Embedding series text embedding model for semantic search, retrieval-augmented generation, clustering, classification, and multilingual code/text retrieval. It supp...
Input
Text or list of texts to embed. Each item supports up to 8192 tokens.
Output embedding dimension. Allowed values: 2048, 1536, 1024, 768, 512, 256, 128, 64.
Allowed values: float.
Idle
Example output — click Run to generate your own
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/embeddingsModel ID
alibaba/text-embedding-v401
Input Schema
3 parameters · 1 required · 2 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
input | union | Required | Text or list of texts to embed. Each item supports up to 8192 tokens. |
dimensions | integer | Optional | Output embedding dimension. · Options: 2048, 1536, 1024, 768, 512, 256, 128, 64 · Default: 1024 20481536102476851225612864 |
encoding_format | string | Optional | Options: float · Default: "float" float |
02
Output Schema
| Field | Type | Description |
|---|---|---|
object | string | Object type: "list" |
data | array | Array of embedding objects |
data[].embedding | number[] | The embedding vector |
data[].index | integer | Index of the input text |
model | string | Model used |
usage.prompt_tokens | integer | Tokens in the input |
usage.total_tokens | integer | Total tokens used |
03
Code Examples
Ready-to-run snippets
curl -X POST https://api.sandbase.ai/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "alibaba/text-embedding-v4",
"input": "SandBase provides a unified API for AI models, agents, and developer tools.",
"dimensions": 1024,
"encoding_format": "float"
}'API README
Alibaba text-embedding-v4 converts text into dense vectors for semantic search, RAG, clustering, classification, and multilingual retrieval. It belongs to the Qwen3-Embedding series and supports configurable output dimensions: 2048, 1536, 1024, 768, 512, 256, 128, and 64.

