OpenAI’s embedding models transform text into lists of floating-point numbers (vectors). Smaller distances between vectors indicate higher semantic similarity, making them useful for semantic search, content clustering, recommendations, and anomaly detection.Documentation Index
Fetch the complete documentation index at: https://portkey-docs-portkey-remote-mcp.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Usage
Supported Models
| Model | Dimensions | Notes |
|---|---|---|
text-embedding-3-small | 1536 | Best cost/performance ratio |
text-embedding-3-large | 3072 | Highest accuracy |
text-embedding-ada-002 | 1536 | Legacy model |
Supported Parameters
| Parameter | Type | Description |
|---|---|---|
model | string | Embedding model ID |
input | string or array | Text to embed. Pass an array to embed multiple strings in one request |
encoding_format | string | float (default) or base64 |
dimensions | integer | Reduce output dimensions (supported on v3 models only) |
user | string | End-user ID for tracking |
FAQs
How can I tell how many tokens a string has before I embed it?
How can I tell how many tokens a string has before I embed it?
Use OpenAI’s Tiktoken library to count tokens before making an embedding request.
How can I retrieve K nearest embedding vectors quickly?
How can I retrieve K nearest embedding vectors quickly?
Use a specialized vector database. See OpenAI’s vector database cookbook for options and examples.
Do V3 embedding models know about recent events?
Do V3 embedding models know about recent events?
The knowledge cutoff for
text-embedding-3-large and text-embedding-3-small is September 2021.
