Site icon

OpenAI Embeddings API


OpenAI Embeddings API enables developers to access embedding AI models like:

Embeddings API

In simple terms, the embedding API turns text into numbers. We can then compute the distance between two vectors to measure the relatedness. Embedding API can be used for use cases like:


Sample Python code to invoke the API is shown below:


OpenAI Embedding API Request
— Python OpenAI SDK
— OpenAI Tutorials —

from openai import OpenAI
client = OpenAI()

# invoke the Embedding API
response = client.embeddings.create(
input=”TestingYour text string goes here”,




OpenAI API Tutorials

OpenAI tutorials on this website can be found at:

Exit mobile version