Generate embeddings
Generate embeddings for a single piece of content:Batch embeddings
Generate embeddings for multiple pieces of content:Dimensionality reduction
Reduce the output dimensionality of embeddings for efficiency:output_dimensionality parameter allows you to specify a smaller dimension for the embedding vectors. This can reduce storage and computation costs while maintaining semantic meaning.
Embedding models
Available embedding models:- gemini-embedding-001 - General-purpose text embeddings
- text-embedding-004 - Latest text embedding model with improved performance
Use cases
Semantic search
Find similar documents by comparing embedding vectors:Clustering
Group similar content together using embedding vectors:Classification
Use embeddings as features for classification tasks:Response format
Theembed_content response contains:
- embeddings - List of embedding objects
- values - The embedding vector (list of floats)
- content - The original content that was embedded