EN ▾
Get API key

Google OpenAI Compatible API vs a Dedicated One

Updated

Google lets you point OpenAI client code at Gemini models, and a dedicated provider does the same with a different model and different rules. This is a fair look at where each one fits.

Key points

  • Google's layer gives access to Gemini models; a dedicated API gives one open-weight model with no content refusals for lawful adult use.
  • Pick Google when you need multimodal input, embeddings or Google's ecosystem.
  • Pick a dedicated API when refusals break your product, and you want flat per-token billing from prepaid credit.
  • Switching between the two is mostly a base URL, key and model name change.
Two glowing bridges connecting one code editor to two different server towers

Short answer: two different bargains

If you searched for a google openai compatible api, you probably found one of two things. Google documents an OpenAI compatibility mode for the Gemini API, so code written for the OpenAI SDK can call Gemini models after you change the base URL, the key and the model name. A dedicated provider such as this site does the same trick with its own endpoint and a different model. The call format is the same. What you get behind it is not.

Google's route fits you if you want Google's models, need more than text, or already live in Google's cloud. A dedicated uncensored API fits if your product keeps hitting refusals from a general assistant model and you want one open-weight text model that answers without content refusals for lawful adult use. Neither choice is better in the abstract. The rest of this page helps you decide for your project.

QuestionGoogle's compatibility layerDedicated API (this site)
What answers your requestGemini models, made by GoogleOne open-weight model, ID uncensored, run by an independent provider
Input typesCheck Google's docs for the current listText only
Embeddings, image or audio generationCheck Google's docsNot offered
Content policyGoogle's own safety systems applyTuned to answer without content refusals for lawful adult use; no sexual content involving minors
Context windowCheck Google's docs per model100,000 tokens, prompt plus completion
BillingCheck Google's current pricing$0.15 per 1M input and $0.50 per 1M output tokens, prepaid

What Google's compatibility layer is

Google did not rebuild its API in the OpenAI shape. It added a translation layer so that the same request and response formats work against Gemini models. You keep the OpenAI SDK, set a Google endpoint as the base URL, use a Google API key and name a Gemini model. The goal is to let teams try Gemini without rewriting code.

That has a few practical consequences. The layer covers the common cases, mainly chat completions and streaming, and Google's documentation lists what else is supported and what is still marked as beta or limited. Parameters that exist only in OpenAI's own platform may be ignored or rejected. Google's own native API exposes features that the compatibility layer may not map one to one, so teams that want every Gemini capability often use the native SDK for those parts.

I cannot give you current numbers for Google's models, limits or prices here, and they change. Treat the table above as a prompt for what to check, and read Google's current documentation before you commit to a design.

One more point about policy. Gemini models run under Google's safety systems and acceptable use rules. For most business apps that is exactly what you want. For fiction tools, roleplay apps, companion apps for adults and similar products, the same safeguards can produce refusals in the middle of a story. That mismatch is the main reason developers look at dedicated providers.

What a dedicated uncensored API offers

This service is small on purpose. It exposes POST /v1/chat/completions and GET /v1/models, one model with the ID uncensored, and a flat token price. The model is an open-weight model run by an independent provider. It is not Google's, OpenAI's or anyone else's official API, and it is not a router that picks between vendors for you.

What you get on the feature side: streaming over SSE with usage at the end, tool calling, JSON mode, and the usual sampling parameters (temperature, top_p, stop, seed, penalties). The context window is 100,000 tokens, shared by prompt and completion, and max_tokens is optional. A full key allows 8 concurrent requests and 300 requests per minute. Prompts are not used for training.

What you do not get: images, audio, video, embeddings and fine-tuning. If your pipeline needs a vector store, you will use a different provider for embeddings and keep this one for generation. That split is common, and it is easy because the two live behind separate base URLs in your config.

The one hard rule is that sexual content involving minors is not allowed, regardless of framing. Everything else follows lawful adult use. Details on billing are on the pricing page, and the exact rules are in the terms.

When Google is the better pick

Be honest about your requirements before you pick a dedicated API. Google's route is the stronger fit in these cases:

  • You need non-text input or output. If you want to send images or other media to the model, a text-only service cannot help.
  • You need embeddings in the same account. Retrieval pipelines often want one vendor for vectors and generation.
  • Your company standardized on Google Cloud. Billing, IAM, audit logs and data-residency questions may be settled already, and a small independent provider will not match that.
  • Your content is mainstream. Customer support bots, summarizers and coding helpers rarely hit refusals. Using a general model with Google's guardrails is a reasonable default there.
  • You want a specific Gemini capability. If a task works best with a model Google trained for it, use that model.

In short, if the thing you are building does not collide with a content policy, the benefits of a large platform usually outweigh the benefits of a niche one.

When a dedicated API is the better pick

A dedicated uncensored API earns its place when refusals are the bug. Typical cases are fiction and roleplay tools for adults, companion apps, writing assistants for dark themes, red-team test harnesses for lawful research, and any app where users complain that the assistant lectures them instead of answering. In those products a refusal is a failed request from the user's point of view, even though a general model considers it a correct one.

Billing also differs. Here you add prepaid credit in any whole amount from $20 to $500, there is a bonus of 5% from $50, 10% from $100 and 15% from $200, and credit never expires. You pay per token, and failed or refused requests are not charged. If your usage is spiky or small, a prepaid balance with no subscription is easy to reason about. Crypto (USDT on TRC20, USDC on Base) is accepted.

Here is a worked example. A batch job sends 3M input tokens and gets back 1M output tokens. Input costs 3 x $0.15 = $0.45, output costs 1 x $0.50 = $0.50, so the job costs $0.95 in total. You can run the same arithmetic on your own volumes, and compare the result against Google's current pricing for the model you are considering.

Switching between them in code

Because both speak the OpenAI format, you can keep the provider choice in configuration. Put the base URL, key and model name in environment variables, and the rest of your code does not change.

import os
from openai import OpenAI

client = OpenAI(
    base_url=os.environ.get("LLM_BASE_URL", "https://api.openaicompatibleapi.com/v1"),
    api_key=os.environ["LLM_API_KEY"],
)

reply = client.chat.completions.create(
    model=os.environ.get("LLM_MODEL", "uncensored"),
    messages=[{"role": "user", "content": "Draft a tense opening scene for a noir story."}],
    temperature=0.9,
)
print(reply.choices[0].message.content)

Test these points when you swap providers:

  1. Model name. Each provider has its own IDs. Here it is uncensored.
  2. Unsupported parameters. A field one side accepts may be rejected or ignored by the other. Log the full error body.
  3. Tool schemas. The format is shared, but models differ in how well they follow a schema. Re-run your tool tests.
  4. Context length. Prompts built for a larger window may overflow 100,000 tokens. Count before you send.
  5. Rate limits. Limits differ per provider; here a full key allows 8 concurrent requests and 300 per minute.

For client-side details and settings for common tools, see the docs, and for background on routing through intermediaries see the proxy comparison. When you are ready to try it, get an API key; a trial of $0.50 is available with one click after sign-up.

A practical way to decide

Take twenty real prompts from your product, including the ones you worry about. Run them against both options with the same system prompt and temperature. Count refusals, count answers you would not ship, and read ten of each by hand. Add token usage and compute the cost per thousand requests with each provider's current price.

If one option clearly wins, you are done. If it is mixed, use both: send mainstream tasks to the general model and the sensitive creative ones to the dedicated endpoint. A small router in your own code, keyed on feature or user setting, costs an afternoon and keeps you from betting everything on one vendor.

Questions and answers

Does Google really have an OpenAI-compatible API?

Google documents an OpenAI compatibility mode for the Gemini API, so OpenAI client libraries can call Gemini models. Check Google's documentation for the supported features and current limits.

Is this site the same as Google's offering?

No. This is a separate hosted API that serves one open-weight model, run by an independent provider. It is not Google's API and not a router across vendors.

Can I use both in one app?

Yes. Both use the OpenAI request format, so you can keep the base URL, key and model name in configuration and route different features to different providers.

Can this API handle images or embeddings?

No. It is text only, with no image, audio or video generation, no embeddings and no fine-tuning.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs

$0.15per 1M input tokens

Get API key