gemini-embedding-2-previewGoogle 的向量模型,用于将输入内容转换为数值向量,支持语义检索和相似度计算。
Google 的向量模型,用于将输入内容转换为数值向量,支持语义检索和相似度计算。
Starting points for evaluation; supported inputs and options are listed in API access.
Check whether the endpoint returns embeddings or reranks documents. Keep indexing and query preprocessing consistent.
/v1beta/models/gemini-embedding-2:generateContent| 參數 | 類型 | 預設值 / 範圍 | 說明資訊 |
|---|---|---|---|
input必填 | string | — | 需要向量化的文字或文字陣列 |
dimensions | integer | >= 1 | 將向量截斷到指定維度 |
encoding_format | enum | = float | 向量傳輸的編碼格式 |
user | string | — | 用於風險審計的終端用戶標識 |
替換 <YOUR_API_KEY> 替換為令牌設定中的 API Key。
所有請求必須攜帶 Authorization: Bearer <TOKEN> 請求頭。Anthropic 格式的端點也接受 x-api-key 請求頭。
在「令牌」頁面生成 API Key,可以按模型、分組、IP、速率等維度精細化授權。
| 參數 | 類型 | 預設值 / 範圍 | 說明資訊 |
|---|---|---|---|
input必填 | string | — | 需要向量化的文字或文字陣列 |
dimensions | integer | >= 1 | 將向量截斷到指定維度 |
encoding_format | enum | = float | 向量傳輸的編碼格式 |
user | string | — | 用於風險審計的終端用戶標識 |
| 供應商 | RPM | TPM | RPD |
|---|---|---|---|
| default | 3.1K | 626K | 63K |
| Google AI Studio | 4.4K | 875K | 88K |
| Google Vertex | 9.1K | 1.8M | 181K |
RPM = 每分鐘請求數,TPM = 每分鐘 token 數,RPD = 每日請求數。限制按令牌分組生效。
Google 的向量模型,用于将输入内容转换为数值向量,支持语义检索和相似度计算。
Create an API key with access to gemini-embedding-2, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.
Pricing depends on the selected provider group and the model billing unit. The current input, output, request, or media prices are shown on this page before sign-up.
The model catalog lists a context window of 8192 tokens. Check the selected endpoint for request limits.
Check whether the endpoint returns embeddings or reranks documents. Keep indexing and query preprocessing consistent.
