OpenAI

text-embedding-3-small API pricing and integration

Integrate text-embedding-3-small using the published protocols below. Review context limits and billing units before choosing request parameters.

Model ID: text-embedding-3-small · Catalog updated: 2026-11-04

Published base prices

Input
$0.02
/ M tokens
Output
$0.00
/ M tokens
USD / 1M tokens
-

Account discounts and final billing are shown in your dashboard.

Model parameters and protocols

Context window
8,200 tokens
Maximum output
See model documentation
Billing type
token_based
Published protocols
/v1/embeddings

Parameters and tool support

A listed protocol does not imply support for every parameter or hosted tool. Image input, reasoning options, structured output, and tool execution depend on the model and route. Validate your workload with a small request and preserve session context for tool continuations.

Tools and sessions guide

Integration examples

Complete examples

Generated from the model’s public capabilities and updated with every selection.

Supported protocols only
Protocol
Language
pip install openai
EmbeddingsPythonDefault provider
Embeddings · Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["GR_API_KEY"],
    base_url="https://endpoint.greatrouter.com"
)

response = client.embeddings.create(
    model="text-embedding-3-small",
    input="Text to embed",
)
print(response.data[0].embedding)