Skip to content

Text Embeddings

POST
/v1beta/models/gemini-embedding-001:embedContent
  • Convert text to vector embeddings for semantic search, clustering, recommendations, and more
  • Required: text in content.parts
  • Optional: output_dimensionality for dimensionality reduction, taskType for task type
  • Official docs: Embeddings

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
object
object
Required

Content to embed

Optional output dimensionality reduction

Optional task type for the embedding (e.g. SEMANTIC_SIMILARITY)

Responses

Success

application/json
object
object

Playground

Authorization
Body

Samples