Bonus: Top up now and we'll double your first deposit — get x2 credits instantly.

Qwen3 Embedding 4B

Qwen3 Embedding 4B is a 4-billion-parameter multilingual text embedding model from Qwen that produces 2560-dimensional vector representations over a context window of around 32K tokens.

What is Qwen3 Embedding 4B?

Qwen3 Embedding 4B is a mid-size 4B-parameter text embedding model from Qwen that generates 2560-dimensional embeddings for long-context inputs of roughly 32K tokens. It is mainly used for semantic search and dense retrieval, where it encodes documents and queries into the same vector space for efficient similarity-based ranking. It is also applied to downstream tasks such as clustering, classification, recommendation, and code or multilingual text retrieval in large-scale RAG and search systems. It belongs to the Qwen3-Embedding model family, which includes smaller (0.6B) and larger (8B) variants built on the same architecture and training recipe.


Providers

Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick — Balanced (price + speed), Nitro (fastest), or Exacto (highest tool-calling accuracy).

Provider Input Output Cache read /M Latency Throughput Uptime
Qwen ~$0.05 $0.00 ~140ms ~60K tps 99.9%
Alibaba Cloud ~$0.06 $0.00 ~160ms ~45K tps 99.9%
Fireworks AI ~$0.055 $0.00 ~150ms ~50K tps 99.9%
Together AI ~$0.058 $0.00 ~170ms ~40K tps 99.9%

Try this model

Test Qwen3 Embedding 4B right here — free to start.

Qwen3 Embedding 4B
Hi! Want to test the model?

Suggestions for your first prompt

Code snippet

Call the model through the OpenAI-compatible API.

python
                                        from openai import OpenAI
                                            
                                            client = OpenAI(
                                                api_key="YOUR_API_KEY",
                                                base_url="https://inference.example.com/v1"
                                            )
                                            
                                            response = client.chat.completions.create(
                                                model="qwen/qwen3-embedding-4b",
                                                messages=[
                                                    {
                                                        "role": "user",
                                                        "content": "Describe this image in one sentence."
                                                    }
                                                ],
                                            )
                                            
                                            print(response.to_json())
                                        
                                    
                                        {
                                                "model": "qwen/qwen3-embedding-4b",
                                                "messages": [
                                                    {
                                                        "role": "user",
                                                        "content": "Describe this image in one sentence."
                                                    }
                                                ]
                                            }
                                        
                                    

5 Core Capabilities

  • Text Embedding

    Generates dense vector representations for text inputs, enabling similarity search, retrieval, recommendation, and other embedding-based applications.

  • Semantic Search

    Supports semantic retrieval by embedding queries and documents into a shared vector space for relevance-based nearest-neighbor search.

  • Document Clustering

    Enables grouping of related documents or sentences by comparing embedding distances, useful for topic discovery and organization.

  • Multilingual Text

    Produces embeddings for text in multiple languages, allowing cross-lingual similarity, retrieval, and alignment tasks.

  • OCR Text Vectors

    Converts OCR-extracted text into embeddings, making scanned or image-derived documents searchable and comparable via vector search.

6 Most Valuable Use Cases

  • Semantic Text Search
  • Document Clustering
  • Topic Tagging
  • Legal Case Retrieval
  • Product Recommendation
  • Multilingual Text Encoding

Why Build on LLM.API?

One unified API. Every major model. Built-in reliability, cost control, and observability.

  • Unified AI Routing

    Dynamically route each request to the best model across providers based on performance, domain, or rules—without changing your integration or redeploying code.

    One endpoint, every model
  • Cost-Aware Orchestration

    Automatically steer traffic to cheaper equivalents, set hard budgets, and mix premium and economy models so you control spend without sacrificing quality.

    Max performance, minimal cost
  • Resilient Fallback Flows

    Configure multi-provider failover so if a model, region, or vendor is down, requests transparently retry elsewhere—no lost traffic, no manual intervention.

    Stay up when vendors fail
  • End-to-End Observability

    Get per-request traces, latencies, costs, and model metrics across all vendors in one place, with logs ready for debugging, tuning, and compliance.

    See every token, everywhere
  • Task-Level Abstractions

    Call high-level tasks—chat, tools, RAG—while LLM.API handles prompt wiring, tool invocation, and vendor quirks, so your code stays simple and portable.

    Code to tasks, not models
  • Massive Batch Execution

    Run millions of inferences as efficient batches with automatic throttling, retries, and provider parallelism, turning slow backfills into predictable pipelines.

    Scale from 10 to 10M calls

When to Use — When NOT to Use

Use it if...

  • You need low-cost, high-throughput text embeddings for large-scale similarity search workloads.
  • You need multilingual text embeddings to support search and clustering across many languages.
  • Your use case involves semantic search, reranking, or retrieval-augmented generation over documents.
  • Your use case involves text classification or clustering using vector similarity rather than prompts.
  • You need compact embeddings from a relatively small model to reduce storage and memory.
  • Your use case involves recommendation or matching systems that rely on vector representations.
  • You need an embedding model optimized for Qwen’s ecosystem and compatible tooling.

Avoid if...

  • You need a general-purpose chat or completion model that generates natural language outputs.
  • Your workload requires reasoning, planning, or tool use rather than pure representation learning.
  • You need image, audio, or multimodal embeddings instead of text-only vectorization.
  • Your workload requires ultra-long context understanding beyond the token limits of this embedder.
  • You need domain-specific embeddings that have been extensively fine-tuned on niche technical data.
  • Your workload requires strict on-device deployment where a 4B-parameter model is too large.
  • You need binary or extremely low-dimensional embeddings for ultra-constrained storage environments.

Frequently Asked Questions

  • What is Qwen3 Embedding 4B?

    Qwen3 Embedding 4B is a 4B-parameter text embedding model from Qwen designed to generate dense vector representations for text retrieval and semantic search.

  • What modalities does Qwen3 Embedding 4B support?

    Qwen3 Embedding 4B is a text-only model that converts textual inputs into numerical embedding vectors; it does not process images, audio, or video.

  • What is Qwen3 Embedding 4B best suited for?

    Qwen3 Embedding 4B is best for semantic search, retrieval-augmented generation, clustering, recommendation, and other applications needing high-quality text similarity embeddings.

  • How is Qwen3 Embedding 4B priced when accessed through LLM.API?

    LLM.API uses its own unified usage-based pricing for Qwen3 Embedding 4B; check the LLM.API pricing page for current per-token embedding rates.

  • What is the context window of Qwen3 Embedding 4B?

    Qwen3 Embedding 4B supports long text inputs, but the exact maximum token context window depends on the configuration exposed by LLM.API.

  • How fast is Qwen3 Embedding 4B in terms of latency?

    Qwen3 Embedding 4B is optimized for low-latency embedding generation, with actual end-to-end speed depending on LLM.API infrastructure and request volume.

  • How do I call Qwen3 Embedding 4B via LLM.API?

    You select the Qwen3 Embedding 4B model name in LLM.API requests and send text input through the embeddings endpoint as described in the LLM.API docs.

  • How does Qwen3 Embedding 4B compare to larger Qwen embedding models?

    Qwen3 Embedding 4B generally offers lower cost and latency than larger Qwen embedding models, with potentially slightly lower embedding quality and capacity.

  • Can Qwen3 Embedding 4B be used for multilingual text embeddings?

    Qwen3 Embedding 4B supports multilingual text to varying degrees, but coverage and quality differ by language and should be validated for your target locales.

  • What limitations should I know about when using Qwen3 Embedding 4B?

    Qwen3 Embedding 4B cannot generate text, understand non-text modalities, or exceed its maximum input length, and embedding quality may degrade on very noisy inputs.

Get one key to every model

Swap your API key. Keep your code.