使用 Google Gemini 原生路径与请求体调用 generateContent、streamGenerateContent 和 Embedding。
Documentation Index
Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
contents/parts 结构或安全设置配置的业务接入。
| Method | Path | 说明 |
|---|---|---|
GET | /v1beta/models | Gemini 模型列表 |
POST | /v1beta/models/{model}:generateContent | 非流式内容生成 |
POST | /v1beta/models/{model}:streamGenerateContent | 流式内容生成 |
POST | /v1beta/models/{model}:embedContent | 单条向量 |
POST | /v1beta/models/{model}:batchEmbedContents | 批量向量 |
role 和 parts。text、inlineData、fileData、functionCall、functionResponse 等。system_instruction 写法。temperature、topP、topK、maxOutputTokens、stopSequences、responseMimeType、responseSchema、thinkingConfig 等字段。category 和 threshold。functionDeclarations、googleSearch、codeExecution、urlContext 等 Gemini 工具。functionCallingConfig。| category | 说明 |
|---|---|
HARM_CATEGORY_HARASSMENT | 骚扰内容 |
HARM_CATEGORY_HATE_SPEECH | 仇恨言论 |
HARM_CATEGORY_SEXUALLY_EXPLICIT | 色情内容 |
HARM_CATEGORY_DANGEROUS_CONTENT | 危险内容 |
| threshold | 说明 |
|---|---|
BLOCK_NONE | 不屏蔽 |
BLOCK_ONLY_HIGH | 仅屏蔽高风险 |
BLOCK_MEDIUM_AND_ABOVE | 屏蔽中等及以上风险 |
BLOCK_LOW_AND_ABOVE | 屏蔽低等及以上风险 |