OpenAI logo
OpenAI

text-embedding-3

High-performance text embedding model for semantic search and similarity calculation

Category Embedding Model ID text-embedding-3-large
Vector Dimensions3072
Model TypeText Embedding
Max Input8191 tokens

Pricing & Specs

💰 Pricing

Price$0.00013 / 1K tokens

⚙️ Specs

Vector Dimensions3072
Model TypeText Embedding
Max Input8191 tokens
OutputFloat vector

API Examples

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.xairouter.com/v1",
    api_key="your-api-key"
)

response = client.embeddings.create(
    model="text-embedding-3-large",
    input="This is a text that needs to be vectorized",
    encoding_format="float"
)

embedding = response.data[0].embedding
print(f"Vector dimension: {len(embedding)}")

cURL

curl https://api.xairouter.com/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "text-embedding-3-large",
    "input": "This is a text that needs to be vectorized",
    "encoding_format": "float"
  }'

Model Features

text-embedding-3 is OpenAI's latest text embedding model with significantly improved performance:

  • High-dimensional Vectors: 3072-dimensional vectors provide richer semantic representation
  • High Performance: Excellent performance in multiple benchmarks
  • High Cost-effectiveness: More affordable pricing compared to previous models
  • Multilingual Support: Supports embedding generation for multiple languages

Use Cases

  • Semantic search
  • Document similarity calculation
  • Recommendation systems
  • Clustering and classification
  • RAG (Retrieval Augmented Generation) applications

Performance Advantages

text-embedding-3 excels in semantic understanding and similarity calculation, making it the ideal choice for building intelligent search and recommendation systems.