Gemini API

Gemini API.
On the SDK you already use.

Every Gemini model, one OpenAI compatible endpoint

Change two lines and call Gemini from the OpenAI or Anthropic SDK. No Google Cloud project, pay per token, and GPT, Grok or DeepSeek on the same key when you need a backup.

base_urlhttps://utopixel.online/api/v1Get a key
Which Gemini

Three picks. Start here.

Setup

Two lines. Then it is Gemini.

Set the base URL and a Gemini model id. Everything else stays the same. Full walkthrough: Gemini with the OpenAI SDK.

PythonOpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="https://utopixel.online/api/v1",
api_key="sk-vb-...",
)
r = client.chat.completions.create(
model="google/gemini-4-carbon",
messages=[{"role": "user", "content": "Hello, Gemini"}],
)
print(r.choices[0].message.content)
Node.jsOpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://utopixel.online/api/v1",
apiKey: process.env.UTOPIXEL_API_KEY,
});
const r = await client.chat.completions.create({
model: "google/gemini-4-carbon",
messages: [{ role: "user", content: "Hello, Gemini" }],
});
console.log(r.choices[0].message.content);
Q1Is this Google's official Gemini API?
No. Utopixel is an independent API service, not affiliated with Google. It forwards your requests to Google's hosted Gemini models and bills you per token, so you get Gemini through an OpenAI compatible endpoint with one key for every lab.
Q2Do I need a Google Cloud account?
No. Sign up with an email, add credit and create a key. There is no Google Cloud project, billing account or service account to set up.
Q3Can I keep using the OpenAI SDK?
Yes. Set base_url to https://utopixel.online/api/v1 and use a Gemini model id such as google/gemini-4-carbon. Messages, streaming, tool calls and JSON output use the same OpenAI request format.
Q4How much context can Gemini take?
Gemini models here take up to 1.05M tokens of context. Each model page lists its own limit.
Q5What happens if Gemini is down?
Send a models list, for example ["google/gemini-4-carbon", "openai/gpt-6.1-sol"], and Utopixel calls the next model only when the first one fails. You pay only for the answer you get.
Q6Can I use Google's Gemini SDK (google-genai)?
Not yet. Utopixel speaks the OpenAI and Anthropic request formats, so use the OpenAI or Anthropic SDK, or any tool that lets you set an OpenAI compatible base URL. Code written against Google's own SDK needs those two lines changed.
Q7Do you store my prompts or responses?
No. Utopixel forwards each request to the model provider and streams the answer back without storing the prompt or the response. It keeps only billing metadata: model, token counts, cost, latency and status.
Q8How am I billed?
Pay as you go per token at the prices on this page. Each response includes usage.cost with the exact amount in USD. No subscription and no minimum monthly spend.

Start building in minutes.

One API key for the models of OpenAI, Google, DeepSeek, Moonshot AI, Qwen, xAI, Z.ai, Meta, Amazon, AionLabs, Anthropic, Baidu, ByteDance Seed, Cohere, Elorian, Fireworks AI, IBM, inclusionAI, Inference.net, KT, Liquid AI, Meituan, Meta, MiniMax, Mistral AI, Moondream, Motif Technologies, Nex AGI, NVIDIA, Particle AI, Perceptron, Prism ML, Reflection AI, Reka, Relace, Ricursive AI, Sakana AI, StepFun, Tencent, Thinking Machines, Unbiased, Upstage, Writer and Xiaomi. Start free, no card needed.