惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
V
Visual Studio Blog
B
Blog
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
L
LangChain Blog
D
Docker

Crazyrouter Blog (English)

Ideogram AI Guide 2026: Product Mockups, Text Rendering, and API Automation Akool AI Voice Generator Review 2026: API Alternatives for Developers GLM 4.6 API Guide 2026: Build Chinese-English Agents with Tool Calling Google Veo3 API Guide 2026: Batch Video Generation, QA, and Fallbacks AI Lip Sync Tools Comparison 2026: Developer Guide for Localization Pipelines Claude Opus 4.8 vs Opus 4.7: Real API Benchmark Results for Developers Opus 4.8 vs Opus 4.7 Coding Test: What Changed for Developers? Opus 4.8 vs Opus 4.7 for Agents: JSON, Tool Use, and Structured Output Gemini 2.5 Flash-Lite for RAG, Agent Routing, and Cost per Successful Task Gemini 2.5 Flash-Lite for Support Automation and Ticket Triage Gemini 2.5 Flash-Lite Use Cases: The Practical Automation Tier for Developers Claude Jupiter v1-p vs GPT-5.5 Benchmark: Real API Test on Reasoning and Coding Claude Jupiter v1-p vs Claude Opus 4.7 vs Sonnet 4.6: Live API Test Claude Jupiter v1-p vs Claude Opus 4.7 vs Sonnet 4.6: Live API Test Claude Code Pricing 2026: Pro vs Max vs Team vs API Costs Claude Opus 4.7 vs DeepSeek V4 Pro: Real API Compatibility and Coding Benchmark Gemini CLI Complete Guide 2026: Repo Automation, CI Agents, and Multi-Model Routing Ideogram AI Guide 2026: Brand Design Automation, API Workflows, and Alternatives GLM 4.6 API Guide 2026: Agents, RAG, Tool Calling, and Bilingual Apps WAN 2.2 Animate Tutorial 2026: Character Consistency, Shot Control, and API Workflows Google Veo3 API Guide 2026: Production Video Pipelines, Prompts, Pricing, and Fallbacks AI API Pricing Comparison 2026: Text, Image, Video, Caching, and Router Costs Codex CLI Installation Guide 2026: Windows, macOS, Linux, Proxies, and CI Setup How to Get a Claude API Key in 2026: Secure Setup for Teams, CI, and Alternatives Gemini Advanced Review 2026: Is It Worth It for Coding, Research, and API Teams? Claude Code Pricing Guide 2026: Team Agent Budgets, API Fallbacks, and Cost Control Seedance 2.0 Pricing: Convert 46 CNY per Million Tokens to Cost per Second Qwen2.5-Omni Guide 2026: Real-Time Voice, Vision, and Multimodal Agents Kimi K2 Thinking Guide 2026: Reasoning Workflows, Evals, and Cost Control Google Veo3 API Guide 2026: Batch Video Pipelines, Pricing, and Fallbacks
Text-Embedding-3-Small: Complete Guide to OpenAI's Most P...
Crazyrouter Team · 2026-05-03 · via Crazyrouter Blog (English)

text-embedding-3-small is OpenAI's cost-effective embedding model, released in January 2024. It converts text into 1536-dimensional vectors that capture semantic meaning — the foundation for semantic search, RAG pipelines, recommendation systems, and classification tasks.

This guide covers everything: pricing, token limits, dimensions, API usage, dimension reduction, performance benchmarks, and how it compares to text-embedding-3-large.

Text-Embedding-3-Small Quick Reference#

SpecValue
Model nametext-embedding-3-small
ProviderOpenAI
Default dimensions1536
Adjustable dimensions256 – 1536
Max input tokens8,191
Max batch size2,048 inputs per request
Pricing (OpenAI direct)$0.020 per 1M tokens
Pricing (Crazyrouter)$0.016 per 1M tokens
MTEB benchmark score62.3
MultilingualYes
Output formatfloat or base64
Release dateJanuary 25, 2024
StatusActive (not deprecated)

Text-Embedding-3-Small Pricing#

text-embedding-3-small costs 0.020per1milliontokens∗∗onOpenAIdirectly.Through[Crazyrouter](https://crazyrouter.com),thepricedropsto∗∗0.020 per 1 million tokens** on OpenAI directly. Through [Crazyrouter](https://crazyrouter.com), the price drops to **0.016 per 1M tokens — a 20% discount.

To put that in perspective:

Document VolumeApprox. TokensCost (OpenAI)Cost (Crazyrouter)
100 pages of text~75,000$0.0015$0.0012
10,000 pages~7.5M$0.15$0.12
1 million pages~750M$15.00$12.00
Wikipedia (English, full)~4.4B$88.00$70.40

Cost Comparison with Other Embedding Models#

ModelPrice / 1M TokensPrice via CrazyrouterDimensions
text-embedding-3-small$0.020$0.0161536
text-embedding-3-large$0.130$0.1003072
text-embedding-ada-002$0.1001536
Google text-embedding-005$0.00625$0.005768
Cohere embed-v4$0.1001024
Voyage voyage-3-large$0.1802048

text-embedding-3-small is 6.5x cheaper than text-embedding-3-large and 5x cheaper than the older ada-002 — while outperforming ada-002 on benchmarks.

For a deeper comparison of all embedding models, see our AI Embeddings Comparison 2026 Guide.

Text-Embedding-3-Small Dimensions#

The default output is a 1536-dimensional vector. But text-embedding-3-small supports dimension reduction via the dimensions parameter — you can request any value from 256 to 1536.

This is done using Matryoshka Representation Learning (MRL). The model is trained so that the first N dimensions of the vector carry the most important information. Truncating to fewer dimensions loses some nuance but keeps most of the semantic signal.

Dimension vs. Quality Tradeoff#

DimensionsMTEB ScoreStorage per VectorRelative Quality
1536 (default)62.36,144 bytes100%
1024~61.54,096 bytes~98.7%
768~60.83,072 bytes~97.6%
512~59.72,048 bytes~95.8%
256~57.81,024 bytes~92.8%

When to Reduce Dimensions#

  • 256 dimensions: Prototyping, low-resource environments, or when storage is the bottleneck
  • 512 dimensions: Good balance for mobile apps or edge deployments
  • 768 dimensions: Matches Google's embedding size — useful for migration
  • 1536 dimensions: Production workloads where quality matters most

Text-Embedding-3-Small Token Limit and Context Length#

text-embedding-3-small accepts up to 8,191 tokens per input string. This is the model's context window for embedding.

Key details:

  • Tokenizer: cl100k_base (same as GPT-4)
  • 1 token ≈ 4 characters in English, ≈ 0.75 words
  • 8,191 tokens ≈ 6,100 words ≈ 24,000 characters
  • Text exceeding 8,191 tokens is truncated (not rejected)

How to Count Tokens Before Sending#

Handling Long Documents#

For documents longer than 8,191 tokens, you have two options:

  1. Chunking: Split into overlapping segments and embed each one
  2. Summarize first: Use an LLM to summarize, then embed the summary

How to Use the Text-Embedding-3-Small API#

Python (OpenAI SDK)#

Batch Embedding (Multiple Texts)#

Send up to 2,048 texts in a single request for better throughput:

cURL#

Response Format#

Base64 Output Format#

For bandwidth-sensitive applications, request base64-encoded output:

Error Handling#

Text-Embedding-3-Small vs Text-Embedding-3-Large#

This is the most common comparison. Here's the full breakdown:

Featuretext-embedding-3-smalltext-embedding-3-large
Default dimensions15363072
Adjustable dimensions256 – 1536256 – 3072
Max tokens8,1918,191
MTEB score62.364.6
Price / 1M tokens$0.020$0.130
Price via Crazyrouter$0.016$0.100
Relative qualityBaseline+3.7% better
Relative costBaseline6.5x more expensive
Storage (float32)6 KB/vector12 KB/vector

When to Choose text-embedding-3-small#

  • Budget-conscious projects
  • High-volume embedding workloads (millions of documents)
  • RAG applications where "good enough" retrieval is fine
  • Prototyping and development
  • Applications where latency matters (smaller vectors = faster similarity search)

When to Choose text-embedding-3-large#

  • Search quality is the top priority and budget allows it
  • Legal, medical, or financial domains where precision matters
  • Small document collections where the 6.5x cost difference is negligible
  • You can use dimension reduction (e.g., 1024 dims) to get large-model quality at reduced storage

The Dimension Reduction Trick#

text-embedding-3-large at 1024 dimensions often outperforms text-embedding-3-small at 1536 dimensions — while using less storage:

Text-Embedding-3-Small vs Ada-002#

text-embedding-ada-002 was OpenAI's previous generation embedding model. Here's why you should migrate:

Featuretext-embedding-3-smalltext-embedding-ada-002
MTEB score62.361.0
Price / 1M tokens$0.020$0.100
Dimensions1536 (adjustable)1536 (fixed)
Dimension reduction✅ Yes❌ No
Multilingual (MIRACL)44.031.4

text-embedding-3-small is 5x cheaper, higher quality, and supports dimension reduction. There's no reason to stay on ada-002.

Migration note: Embeddings from different models are not compatible. Switching requires re-embedding all your documents.

Text-Embedding-3-Small Multilingual Support#

text-embedding-3-small supports multilingual text natively. On the MIRACL multilingual benchmark, it scores 44.0 — a massive improvement over ada-002's 31.4.

Supported languages include English, Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Russian, Arabic, Hindi, and many more.

For applications that are primarily multilingual (100+ languages, cross-lingual retrieval at scale), also consider Cohere embed-v4 or the open-source BGE-M3.

Is Text-Embedding-3-Small Deprecated?#

No. As of 2026, text-embedding-3-small is fully active and supported by OpenAI. It is not deprecated and there is no announced deprecation date.

The model that is deprecated is the older text-embedding-ada-002. OpenAI recommends migrating from ada-002 to the text-embedding-3 series.

Timeline:

  • text-embedding-ada-002: Released December 2022, now legacy
  • text-embedding-3-small: Released January 2024, current recommended model
  • text-embedding-3-large: Released January 2024, current premium model

Building Semantic Search with Text-Embedding-3-Small#

Here's a complete working example:

Scaling with a Vector Database#

For production workloads with millions of documents, use a vector database instead of in-memory numpy:

Other popular vector databases that work well with text-embedding-3-small:

  • Pinecone: Fully managed, easiest to start
  • Weaviate: Open source, supports hybrid search
  • Qdrant: Open source, high performance
  • ChromaDB: Lightweight, great for prototyping
  • pgvector: PostgreSQL extension, no new infrastructure needed

Performance Benchmarks#

MTEB (Massive Text Embedding Benchmark)#

ModelAverageClassificationClusteringRetrieval
text-embedding-3-small62.367.141.251.7
text-embedding-3-large64.669.844.155.4
text-embedding-ada-00261.066.340.149.3
Cohere embed-v466.271.546.356.8
Voyage voyage-3-large67.172.047.258.1

Multilingual (MIRACL)#

ModelMIRACL Score
text-embedding-3-small44.0
text-embedding-3-large54.9
text-embedding-ada-00231.4

Latency#

text-embedding-3-small is one of the fastest commercial embedding models. Typical latency through Crazyrouter:

Batch SizeAvg Latency
1 text~50ms
10 texts~80ms
100 texts~200ms
1000 texts~800ms

Best Practices#

  1. Batch requests: Send multiple texts per API call (up to 2,048) to reduce overhead
  2. Cache embeddings: Never re-embed the same text — store results in a vector database or cache
  3. Normalize vectors: The API returns normalized vectors by default, but verify if using dimension reduction
  4. Choose dimensions wisely: Start with 1536, reduce only if storage or latency is a real constraint
  5. Use consistent models: Never mix embeddings from different models in the same index
  6. Chunk long documents: Split texts over 8,191 tokens with overlap for context continuity
  7. Monitor token usage: Track usage.total_tokens in responses to manage costs

Frequently Asked Questions#

What is text-embedding-3-small?#

text-embedding-3-small is OpenAI's cost-effective text embedding model. It converts text into 1536-dimensional numerical vectors that capture semantic meaning, enabling applications like semantic search, RAG, classification, and clustering.

How much does text-embedding-3-small cost?#

0.020per1milliontokensonOpenAIdirectly.Through[Crazyrouter](https://crazyrouter.com),itcosts0.020 per 1 million tokens on OpenAI directly. Through [Crazyrouter](https://crazyrouter.com), it costs 0.016 per 1M tokens — 20% cheaper. Embedding 10,000 pages of text costs roughly $0.15.

What is the token limit for text-embedding-3-small?#

8,191 tokens per input string. That's approximately 6,100 words or 24,000 characters in English. Text exceeding this limit is silently truncated.

How many dimensions does text-embedding-3-small output?#

1,536 dimensions by default. You can reduce this to any value between 256 and 1,536 using the dimensions parameter in the API request.

Is text-embedding-3-small deprecated?#

No. It is fully active and supported as of 2026. The deprecated model is the older text-embedding-ada-002.

What's the difference between text-embedding-3-small and text-embedding-3-large?#

text-embedding-3-large outputs 3,072 dimensions (vs 1,536), scores 3.7% higher on MTEB benchmarks, and costs 6.5x more (0.13vs0.13 vs 0.02 per 1M tokens). For most applications, the small model is sufficient.

Does text-embedding-3-small support multilingual text?#

Yes. It handles multiple languages natively and scores 44.0 on the MIRACL multilingual benchmark. No special configuration is needed — just pass text in any supported language.

Can I use text-embedding-3-small with LangChain?#

Yes. LangChain has built-in support:

Can I use text-embedding-3-small with LlamaIndex?#

Yes:

How does text-embedding-3-small compare to free/open-source models?#

Open-source models like BGE-M3 (MTEB 63.2) and E5-Mistral-7B (MTEB 66.6) can match or exceed its quality. The trade-off is you need GPU infrastructure to run them. text-embedding-3-small wins on convenience and total cost for small-to-medium workloads.

Summary#

text-embedding-3-small is the default choice for production embedding workloads in 2026. At 0.02/1Mtokens(or0.02/1M tokens (or 0.016 via Crazyrouter), it delivers strong quality across search, RAG, and classification — with the flexibility of dimension reduction and multilingual support.

Choose text-embedding-3-small when: you want the best price-to-performance ratio for embedding workloads.

Choose text-embedding-3-large when: you need maximum quality and the 6.5x cost increase is acceptable.

Access it through Crazyrouter for 20% lower pricing and a unified API that also gives you GPT-5, Claude, Gemini, and 300+ other models — all with one API key.