Request Body
string
required
The embedding model to use (e.g.,
text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002).string | array
required
The text to embed. Can be a single string or an array of strings for batch processing.
string
default:"float"
The format to return embeddings in. Options:
float or base64.integer
The number of dimensions for the output embeddings. Only supported by some models.
Response
string
Always
list.array
Array of embedding objects.
string
The model used to generate embeddings.
object
Token usage statistics.
Examples
Single Text Embedding
Batch Embeddings
Custom Dimensions
Response Example
Use Cases
Semantic Search
Find similar content by comparing embedding distances.
Clustering
Group similar documents together based on embeddings.
Classification
Use embeddings as features for ML classifiers.
Recommendations
Find similar items for recommendation systems.
