OpenAI Embeddings
by OpenAI
Text turned into numbers for search.
Embeddings and rerankPartial System Degradation · live status
1. Price
No free tier on the pricing page. As reported on the official pricing page, checked Oct 10, 2026.
developers.openai.com/api/docs/pricing2. Commercial use
“You are responsible for ensuring that the content you input to our API does not violate any applicable law or our Terms of Use.”
You own inputs and outputs; your content must follow the law and OpenAI's Terms of Use.
developers.openai.com/api/docs/guides/embeddings.md3. Key & sign-up
“Load API keys from an environment variable or key management service on the server.”
OpenAI API key sent as a Bearer header from your server (Authorization: Bearer $OPENAI_API_KEY)
developers.openai.com/api/reference/overview.md4. Agent access
“This MCP server is documentation-only. It does not call the OpenAI API on your behalf.”
Our agent check: 4 of 6 (Nov 13, 2026).
developers.openai.com/learn/docs-mcp.mdChecked against the maker's official pages, pricing on Oct 10, 2026. Tap a verdict to see its source.How we checkedReport an error
What OpenAI Embeddings does
OpenAI Embeddings is a paid online service that turns a piece of text into a long list of numbers that captures its meaning. Texts about the same thing get similar numbers, so your app can find related articles, products or questions even when the words differ. You keep the numbers in your own database and compare them when someone searches.
- OpenAI Embeddings is one of 5 APIs in the Embeddings and rerank category on AgentGid.
- It is not among the 4 that can be started for free.
- Its official SDK is the 1st most downloaded in the category (156M a week).
What people build with it
Search that understands meaning
A help center where "can't log in" also finds the article called "Reset your password", because the meaning matches, not the words.
"You may also like" suggestions
Show products, recipes or articles whose descriptions are close to the one a visitor is reading.
Sort support tickets by topic
Put each new ticket into the closest category, such as billing, delivery or login, by comparing it with a short description of each category.
Check the bill before a big import
Count the tokens of all your texts on your own computer first, and see what embedding them will cost before you send anything.
Save space with shorter vectors
Ask for fewer numbers per text when you store millions of items, so your database stays smaller and searches stay fast.
Spot duplicate questions Idea
Before a new forum question or idea is posted, show the closest existing ones so people join the old thread instead.
OpenAI Embeddings popularity
SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.
Pricing
None
No monthly plan
$0.02/1M tokens (text-embedding-3-small); $0.13/1M (text-embedding-3-large); $0.10/1M (text-embedding-ada-002)
Pay-as-you-go per input token; part of the general OpenAI API account.
What one action costs
| Action | Price |
|---|---|
| 1M input tokens, text-embedding-3-small | $0.02 |
| 1M input tokens, text-embedding-3-large | $0.13 |
| 1M input tokens, text-embedding-ada-002 (older model) | $0.10 |
As reported on the official pricing page, checked Oct 10, 2026. Prices change: confirm before you buy. developers.openai.com/api/docs/pricing
Limits
8,192 tokens per text; at most 2,048 texts in one request
300,000 tokens in total per request
Requests and tokens per minute depend on your tier and the model; see the limits page in your account
From the official docs. developers.openai.com/api/reference/resources/embeddings/methods/create.md
Status and incidents
Partial System Degradation
21 incidents, 2 of them major
From the official status page, checked Nov 26, 2026. status.openai.com
Key and access
OpenAI API key sent as a Bearer header from your server (Authorization: Bearer $OPENAI_API_KEY)
OPENAI_API_KEYNot stated on the pages we read
Steps only a person can do
- Sign in to the OpenAI platform and create an API key. Put it in .env as OPENAI_API_KEY (kept out of git) and read it on the server only.
- Add a payment method and buy prepaid credits. No code change; run the token-count script first to see the cost of the first import.
Commercial use and your data
It is a paid online service, not open source. You own the text you send and the numbers you get back, so you may use and even share them. Your text must not break the law or OpenAI's terms of use.
You own inputs and outputs; your content must follow the law and OpenAI's Terms of Use.
“You are responsible for ensuring that the content you input to our API does not violate any applicable law or our Terms of Use.” source
The docs say you may share your embeddings online, because you own them; the source texts keep their own rights.
“Yes, customers own their input and output from our models, including in the case of embeddings.” source
Give each client app its own project and service account key instead of a developer's personal key.
“Don't share one developer's key across a team or use that person's identity as the permanent identity of a production application.” source
“As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models (unless you explicitly opt in to share data with us).”
Embedding requests are kept in abuse monitoring logs up to 30 days and are not stored as application state; Zero Data Retention eligible for approved customers.
“/v1/embeddings No 30 days None Yes No” source
Data residency per project for eligible customers (via sales).
“Data residency controls are a project configuration option that allow you to configure the location of infrastructure OpenAI uses to provide services.” source
Errors to handle
The key sent with the request is wrong or was revoked.
Check the key; do not retry unchanged.
Too many requests or tokens per minute, common during a big import.
Retry with backoff after Retry-After, send texts in batches, or use the Batch API for large imports.
No prepaid credits left.
Top up credits; retrying does not help.
A problem on OpenAI's side.
Retry after a short wait.
Use it from an agent
4 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page yes, AI assistants allowed yes
Checked Nov 13, 2026.
OpenAI Docs MCP (documentation only)
claude mcp add --transport http openaiDeveloperDocs https://developers.openai.com/mcp
npm install openaipip install openaiAlternatives
OpenAI Embeddings This page
Pick Voyage AI when you need embeddings tuned for code or for images, plus rerankers that reorder search results.
Pick BGE when you want open-source embedding models that run on your own server with no per-token bill.
Pick Mixedbread when you want a ready search and indexing service over your files instead of handling raw vectors.
Get started
Tell your AI assistant
“Add meaning-based search to my site: on the server, embed each article with OpenAI text-embedding-3-small (key from OPENAI_API_KEY), store the vectors in Postgres with pgvector, embed the search query the same way and return the 5 closest articles.”
Create an OpenAI API key and keep it in OPENAI_API_KEY on the server.
export OPENAI_API_KEY="your_api_key_here"Install the official package (pip install openai or npm install openai) and send your text with the model name.
from openai import OpenAI client = OpenAI() response = client.embeddings.create( input="Your text string goes here", model="text-embedding-3-small" ) print(response.data[0].embedding)Store each vector in a vector database (for example Postgres with pgvector) and search it by similarity.
First request
curl https://api.openai.com/v1/embeddings \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Hello world",
"model": "text-embedding-3-small",
"encoding_format": "float",
"dimensions": 3
}'
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.26726124,
0.53452248,
0.80178373
],
"index": 0
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 2,
"total_tokens": 2
}
}
Mistakes to avoid
Distances between vectors from different models mean nothing.
pgvector indexes plain vectors only up to 2,000 numbers, and text-embedding-3-large returns 3072 by default.
The endpoint rejects inputs over these limits.
The docs name cl100k_base for the third-generation embedding models.
The docs recommend a vector database for searching many vectors quickly.
Questions
What does it cost?
Billed per input token. List prices per 1M tokens are $0.02 for text-embedding-3-small and $0.13 for text-embedding-3-large.
How many numbers does one text become?
1536 for text-embedding-3-small and 3072 for text-embedding-3-large by default; you can ask for fewer.
Can I share or publish the vectors I get?
Yes. The docs say customers own their input and output, including embeddings.
How do I compare two vectors?
The docs recommend cosine similarity; since the vectors have length 1, a dot product gives the same result faster.
Does OpenAI keep or train on the texts I embed?
It does not train on them; safety logs for embedding requests are kept up to 30 days.