跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.omniakey.com/llms.txt

Use this file to discover all available pages before exploring further.

原始 HTTP 请求使用这个 Gemini 原生 base URL:
https://api.omniakey.com/v1beta

Generate Content

模型 id 在 URL path 中:
POST /v1beta/models/{model}:generateContent
curl "https://api.omniakey.com/v1beta/models/gemini-3.1-pro-preview:generateContent" \
  -H "Authorization: Bearer your-omniakey-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Explain what a race condition is."}]}]
  }'
如果工具只支持 OpenAI 兼容协议,也可以使用 https://api.omniakey.com/v1 并传入 Gemini model id。
Google Gen AI SDK 默认使用 Gemini v1beta API 版本,所以 SDK 示例通常把裸域名 https://api.omniakey.com 作为 base_url;原始 HTTP 请求则在 URL 中包含 /v1beta

模型列表

GET /v1beta/models 可用于 Gemini 原生模型发现。可读模型目录见 支持模型