Google: Gemini Embedding 2 Preview
Embeddinggoogle/gemini-embedding-2-previewGemini Embeddings is a multimodal embedding technique that converts text, audio, video, and image data into numerical vectors that can be processed by machine learning algorithms, especially large models. These vector representations are designed to capture the semantic meaning and context of the data they represent.
8K context window
8K max output tokens
Released: 2026-03-10
Supported Protocols:gemini
Available Providers:Vertex
Capabilities:VisionAudio InputVideo Input
Pricing
| Type | Price |
|---|---|
| Input Tokens | $0.2/M |
| Output Tokens | $0/M |
| Image Input | $0.45/M |
| Audio Input | $6.5/M |
| Video Input | $12/M |
Code Examples
from google import genaiclient = genai.Client(api_key="YOUR_OFOX_API_KEY",http_options={"api_version": "v1beta", "url": "https://api.ofox.ai/gemini"},)response = client.models.embed_content(model="google/gemini-embedding-2-preview",contents="Hello, world!",)print(response.embeddings[0].values[:5])
Related Models
Frequently Asked Questions
Google: Gemini Embedding 2 Preview on Ofox.ai costs $0.2/M per million input tokens and $0 per million output tokens. Pay-as-you-go, no monthly fees.
Google: Gemini Embedding 2 Preview supports a context window of 8K tokens with max output of 8K tokens, allowing you to process large documents and maintain long conversations.
Simply set your base URL to https://api.ofox.ai/v1 and use your Ofox API key. The API is OpenAI-compatible โ just change the base URL and API key in your existing code.
Google: Gemini Embedding 2 Preview supports the following capabilities: Vision, Audio Input, Video Input. Access all features through the Ofox.ai unified API.