Skip to main content
POST
Embeddings

Introduction

Convert text to vector embeddings for semantic search, similarity calculation, and clustering.

Authentication

string
required
Bearer Token, e.g. Bearer sk-xxxxxxxxxx

Request Parameters

string
required
Model name, e.g. text-embedding-3-small, text-embedding-3-large
string | array
required
Text to embed, string or array of strings
string
default:"float"
Return format: float or base64
integer
Output dimensions (supported by some models)

cURL Example

Python Example

Supported Models

Notes

  • For batch embedding, pass an array of strings to input
  • Some models support custom dimensions via dimensions parameter
  • Requires openai library: pip install openai