We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic…
Qwen/Qwen3-Embedding-4B cover image

Qwen/Qwen3-Embedding-4B

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B).

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks. Building upon the dense foundational models of the Qwen3 series, it provides a comprehensive range of text embeddings and reranking models in various sizes (0.6B, 4B, and 8B).

Public
$0.005 / Mtoken
8,192
ProjectPaperLicense

OpenAI-compatible HTTP API

DeepInfra supports the OpenAI embeddings API. The following creates an embedding vector representing the input text

curl "https://api.deepinfra.com/v1/openai/embeddings" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEEPINFRA_TOKEN" \
  -d '{
    "input": "The food was delicious and the waiter...",
    "model": "Qwen/Qwen3-Embedding-4B",
    "encoding_format": "float"
  }'
copy

which will return something similar to

{
  "object":"list",
  "data":[
    {
      "object": "embedding",
      "index":0,
      "embedding":[
        -0.010480394586920738,
        -0.0026091758627444506
        ...
        0.031979579478502274,
        0.02021978422999382
      ]
    }
  ],
  "model": "Qwen/Qwen3-Embedding-4B",
  "usage": {
    "prompt_tokens":12,
    "total_tokens":12
  }
}
copy

Input fields

modelstring

model name


inputarray

sequences to embed


encoding_formatstring

format used when encoding

Default value: "float"


dimensionsinteger

The number of dimensions in the embedding. If not provided, the model's default will be used.If provided bigger than model's default, the embedding will be padded with zeros.

Range: 32 ≤ dimensions

Input Schema

Output Schema