边缘安全加速平台 EO Google AI Studio

使用 Google AI Studio 的 Gemini 系列模型,帮助你快速构建应用。Makers Models 服务不为用户提供 Google AI Studio 厂商密钥和商业化计费能力,你必须在控制台页面绑定该厂商的 API Key 后才能调用 Gemini 系列模型。

相关产品
边缘安全加速平台 EO 产品页,含版本规格、价格与购买入口。

如下为模型以及 model 传参示例:

模型 传入 model 参数
gemini-3.5-flash google/gemini-3.5-flash
gemini-3.1-pro-preview google/gemini-3.1-pro-preview
gemini-3.1-flash-lite google/gemini-3.1-flash-lite
gemini-3-flash-preview google/gemini-3-flash-preview
gemini-2.5-pro google/gemini-2.5-pro
gemini-2.5-flash google/gemini-2.5-flash
gemini-2.5-flash-lite google/gemini-2.5-flash-lite

具体可用模型请以厂商文档为准,查看 所有模型。

一、调用示例

调用模型前请确保已绑定 Google AI Studio 厂商的 API Key,前往控制台 模型与密钥页面 绑定。

二、SDK

使用 AI SDK// Node.js 18+import { createAiGateway } from "@edgeone/makers-models-provider";import { generateText } from "ai";const aiGateway = createAiGateway({ apiKey: process.env.MAKERS_MODELS_KEY,});const { text } = await generateText({ model: aiGateway("google/gemini-3.5-flash"), prompt: "What can you do?",});使用 Google Gen AI JS SDK// Node.js 20+import { GoogleGenAI } from "@google/genai";const ai = new GoogleGenAI({ apiKey: process.env.MAKERS_MODELS_KEY, httpOptions: { baseUrl: "https://ai-gateway.edgeone.link/v1/google-ai-studio", }});const response = await ai.models.generateContent({ model: "google/gemini-3.5-flash", contents: "What can you do?",});console.log(response.text);

三、cURL

使用 OpenAI Chat Completions API 请求curl -i -X POST "https://ai-gateway.edgeone.link/v1/chat/completions" \\ -H "Authorization: Bearer $MAKERS_MODELS_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "model": "google/gemini-3.5-flash", "messages": [ { "role": "user", "content": "What can you do?" } ] }'

赞 (0)
上一篇 4天前
下一篇 4天前