Embeddings
Text Embedding Series
Embeddings
POST
Embeddings
Introduction
Convert text to vector embeddings for semantic search, similarity calculation, and clustering.Authentication
Bearer Token, e.g.
Bearer sk-xxxxxxxxxxRequest Parameters
Model name, e.g.
text-embedding-3-small, text-embedding-3-largeText to embed, string or array of strings
Return format:
float or base64Output dimensions (supported by some models)
cURL Example
Python Example
Supported Models
| Model | Dimensions | Description |
|---|---|---|
| text-embedding-3-small | 1536 | Cost-effective for most use cases |
| text-embedding-3-large | 3072 | High precision for demanding applications |
| text-embedding-ada-002 | 1536 | Legacy model |
Notes
- For batch embedding, pass an array of strings to
input - Some models support custom dimensions via
dimensionsparameter - Requires
openailibrary:pip install openai
