Text Embedding v4 API

Multilingual text embedding with selectable output dimensions (64–2048). Up to 8,192 tokens per input.

Alibaba CloudEmbeddings8192 contextSingaporeProprietary EndpointNew

About Text Embedding v4

Multilingual text embedding with selectable output dimensions (64–2048). Up to 8,192 tokens per input.

Also known as Text Embedding, Text-Embedding-v4

custom dimensionssparse vectorstask instructionsbatch

Text Embedding v4 specs

Model ID
text-embedding-v4
Provider
Alibaba Cloud
Category
Embeddings
Context window
8192 tokens
Input
text
Output
embedding
Region
Singapore
Endpoints
POST /v1/embeddings

Text Embedding v4 API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.

Type
Spec
Rate
Input
per 1M prompt tokens
$0.07
Compare on the full pricing page

How to call the Text Embedding v4 API

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
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."
  }'
Python (OpenAI SDK)
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])
Full Text Embedding v4 API reference

Text Embedding v4 API parameters

Request parameters supported by the Text Embedding v4 API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
inputstring--Text or array of texts to embed (max 10 entries, 8192 tokens each).
dimensionsnumber10242048, 1536, 1024, 768, 512, 256, 128, 64Vector dimension. Higher = more semantic info, more storage cost.
encoding_formatenumfloatfloat, base64Embedding output format: float (default array of floats) or base64.
userstring--Optional caller identifier (passed through to upstream).

Good to know

Output dimensions (selectable per request)

  • 64, 128, 256, 512, 768, 1024 (default), 1536, 2048
  • Higher dimensions retain more semantic detail at higher storage cost

Batch

  • Up to 10 inputs per request, 8,192 tokens each

Languages

  • 100+ natural languages including Chinese, English, Spanish, French, Japanese, Korean, German, Russian — plus most common programming languages

Text Embedding v4 API: common questions

How much does the Text Embedding v4 API cost?

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.

What is the context window of Text Embedding v4?

Text Embedding v4 supports a 8192-token context window.

Which endpoint does Text Embedding v4 use?

Text Embedding v4 is served through POST /v1/embeddings on api.empiriolabs.ai with standard bearer-token authentication.

Can I try Text Embedding v4 in the browser before integrating?

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.

How do I get a Text Embedding v4 API key?

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.

Ready to use better endpoints?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.