
Multilingual text embedding with selectable output dimensions (64–2048). Up to 8,192 tokens per input.
Multilingual text embedding with selectable output dimensions (64–2048). Up to 8,192 tokens per input.
Also known as Text Embedding, Alibaba Cloud Text Embedding v4
text-embedding-v4/v1/embeddingsLive pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Text Embedding v4 serves the OpenAI-compatible Embeddings API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 and use the model id text-embedding-v4. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/embeddings \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-v4",
"input": "The quick brown fox jumps over the lazy dog."
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
embedding = client.embeddings.create(
model="text-embedding-v4",
input="The quick brown fox jumps over the lazy dog.",
)
print(embedding.data[0].embedding[:8])Request parameters supported by the Text Embedding v4 API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| input | string | - | - | Text or array of up to 2,048 texts to embed, 8,192 tokens each. |
| dimensions | number | 1024 | 2048, 1536, 1024, 768, 512, 256, 128, 64 | Vector dimension. Higher = more semantic info, more storage cost. |
| encoding_format | enum | float | float, base64 | Embedding output format: float (default array of floats) or base64. |
| user | string | - | - | Optional identifier for the end user making the request. |
| output_type | enum | dense | dense, sparse, dense_and_sparse | dense returns the vector in embedding, sparse returns token weights in sparse_embedding, and dense_and_sparse returns both. Every output type bills the same tokens. |
| instruct | string | - | - | An instruction describing the search task, such as: Given a web search query, retrieve relevant passages that answer the query. Set it when embedding search queries... |
Output dimensions (selectable per request)
Sparse vectors (output_type)
Query instructions (instruct)
On EmpirioLabs, Text Embedding v4 is billed pay as you go: Input $0.07 per 1M prompt tokens. The live rate card on this page always matches what the API charges.
Text Embedding v4 supports a 8K-token context window.
Text Embedding v4 is served through POST /v1/embeddings on api.empiriolabs.ai with standard bearer-token authentication.
Yes. The EmpirioLabs playground runs Text Embedding v4 in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.