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_dimensionalityfor dimensionality reduction,taskTypefor task type - Official docs: Embeddings
Authorizations
bearer
Type
HTTP (bearer)
Request Body
application/json
content
object
Required
Content to embed
Expand
output_dimensionality
integer
Optional output dimensionality reduction
taskType
string
Optional task type for the embedding (e.g. SEMANTIC_SIMILARITY)
Responses
Success
application/json
object
embedding
object