Google AI Studio
The Makers Models service does not provide Google AI Studio vendor keys or commercial billing capabilities to users. You must bind the vendor's API Key on the console page before you can invoke Gemini series models.
The following is an example of the model and model parameter passing:
Model | model Parameter to Pass |
gemini-3.1-pro-preview | google/gemini-3.1-pro-preview |
gemini-3-flash-preview | google/gemini-3-flash-preview |
gemini-3.1-flash-lite-preview | google/gemini-3.1-flash-lite-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 |
Call Example
Before invoking a model, ensure that you have bound the Google AI Studio vendor's API Key. Go to the Models & Keys page in the console to bind it.
SDK
Using the 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.1-pro-preview"),prompt: "What can you do?",});
Using the 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-flash-preview",contents: "What can you do?",});console.log(response.text);
cURL
Making Requests to the 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.1-pro-preview","messages": [{"role": "user","content": "What can you do?"}]}'