Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
使用 Gemini SDK 调用 OpenAI 和 Anthropic 模型
https://api.pipellm.ai/gemini
/gemini
https://api.pipellm.ai/gemini/v1beta/models/{model}:generateContent
import google.generativeai as genai from google.generativeai import types # 使用 PipeLLM 配置 genai.configure( api_key="your-pipellm-api-key", transport="rest", client_options={"api_endpoint": "api.pipellm.ai/gemini"} ) # 使用 OpenAI 或 Anthropic 模型 model = genai.GenerativeModel("gpt-5") # 或 "claude-sonnet-4-6" response = model.generate_content("你好,最近怎么样?") print(response.text)
curl "https://api.pipellm.ai/gemini/v1beta/models/gpt-5:generateContent" \ -H "Content-Type: application/json" \ -H "x-goog-api-key: your-pipellm-api-key" \ -d '{ "contents": [ {"role": "user", "parts": [{"text": "你好,最近怎么样?"}]} ] }'
gpt-5
claude-sonnet-4-6
generateContent
此页面对您有帮助吗?