Skip to main content
POST
Embeddings (Gemini format)

Introduction

Create embeddings with the model specified in the URL path. Request body matches the OpenAI-style fields. See also Embeddings (OpenAI format) (POST /v1/embeddings).

Authentication

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

Path parameters

string
required
Model or engine ID in the path

Request body

string
required
Model name (may match path model)
string | array
required
Text to embed
string
default:"float"
float or base64
integer
Output dimensions

Example

Response

Same shape as POST /v1/embeddings (object, data, model, usage).