text-embedding-3-small

Common Name: Text-embedding-3-small

OpenAI
Released on Jan 25, 2024 12:00 AM

Cost-efficient embedding model with improved performance over ada-002, supporting up to 8191 tokens.

Specifications

Context8,191
Maximum Output1,536
Inputtext
Outputvector

Performance (7-day Average)

Uptime
TPS
RURT

Pricing

Input$0.02/MTokens
Batch Input$0.01/MTokens

Usage Statistics

No usage data available for this model during the selected period
View your usage statistics for this model

Similar Models

$33.00/$66.00/M
ctx8Kmax8Kavailtps
InOutCap

OpenAI's advanced language model with superior reasoning, creativity, and complex task handling capabilities.

$33.00/$66.00/M
ctx8Kmax8Kavailtps
InOutCap

GPT-4 snapshot from June 2023 with improved function calling support. Optimized for complex reasoning tasks.

$0.11//M
ctx8Kmax2Kavailtps
InOut

Legacy embedding model generating 1536-dimensional vectors for semantic search and similarity tasks.

$0.14//M
ctx8Kmax3Kavailtps
InOut

High-performance embedding model generating 3072-dimensional vectors for advanced semantic understanding.

Documentation

text-embedding-3-small

A highly efficient embedding model that provides excellent performance for most use cases at a fraction of the cost of larger models.

Key Features

  • 1536 Dimensions: Default embedding size (adjustable)
  • 8191 Max Tokens: Large input capacity
  • Cost Effective: Lower price than text-embedding-3-large
  • Fast: Optimized for high-throughput applications

API Usage

Note: This model uses the /v1/embeddings endpoint, not /v1/chat/completions.

python
from openai import OpenAI

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

response = client.embeddings.create(
    model="text-embedding-3-small",
    input="The quick brown fox jumps over the lazy dog",
)

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

Batch Embedding

You can embed multiple texts in a single request:

python
response = client.embeddings.create(
    model="text-embedding-3-small",
    input=[
        "First document to embed",
        "Second document to embed",
        "Third document to embed",
    ],
)

for i, item in enumerate(response.data):
    print(f"Document {i}: {len(item.embedding)} dimensions")

Reducing Dimensions

You can request smaller embeddings to save storage:

python
response = client.embeddings.create(
    model="text-embedding-3-small",
    input="Hello world",
    dimensions=512,  # Reduce from 1536 to 512
)

Use Cases

Use CaseDescription
Semantic SearchFind relevant documents based on meaning
ClusteringGroup similar texts together
ClassificationCategorize text by similarity to examples
RAGRetrieval-Augmented Generation pipelines