Skip to main content
POST
Gemini embedding

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

model
string
required

Gemini model name without the google/ prefix.

Minimum string length: 1
Example:

"gemini-embedding-2-preview"

Body

application/json
content
object
required

Content to embed.

model
string

Model ID.

outputDimensionality
integer

Output embedding dimension.

Required range: x >= 1
taskType
string

Embedding task type.

title
string

Title for retrieval tasks.

Response

200 - application/json

Successful response

embedding
object
required