EN ▾
Get API key

Gemma API Alternative: Hosted Uncensored Text LLM

This is a hosted text-generation API with an OpenAI-compatible interface, one uncensored open-weight model and prepaid pricing. Here is what it does, what it does not, and how to call it.

Illustration of data streams flowing through a terminal shape and coming out as chat bubbles

Key points

  1. Two endpoints: POST /v1/chat/completions and GET /v1/models
  2. Model ID uncensored, 100,000 token context, streaming, tools and JSON mode
  3. $0.15 per 1M input and $0.50 per 1M output tokens, prepaid, credit never expires
  4. Text only, and independent of any official vendor API

What this page covers

If you searched for a Gemma API, you may be looking for one of two things: Google's own hosted access to its models, or a third-party endpoint that serves an open-weight model with fewer content restrictions. This site is the second. It is a hosted, OpenAI-compatible text API run on top of one open-weight model from an independent provider. It is not the official API of Google, Meta, Mistral, Qwen, DeepSeek, OpenAI, xAI or Anthropic, and it is not a router that picks between vendors.

The model is tuned to answer without content refusals for lawful adult use. That makes it a fit for fiction, roleplay, companion apps and other work where a standard assistant often declines. It is text only. There is no image, audio or video generation, no embeddings and no fine-tuning.

The model ID you pass is uncensored. Everything else follows the OpenAI chat format you probably already use.

Endpoints and authentication

The base URL is https://api.gemmaapi.top/v1. Two methods are available.

  • POST /v1/chat/completions sends messages and returns a completion, streamed or not.
  • GET /v1/models lists the models available to your key.

Authentication is a bearer token in the Authorization header. Any OpenAI SDK or client accepts a custom base URL and key, so switching an existing project usually means changing two strings. The documentation has the full request reference.

Call it from Python, Node or curl

Python with the official package:

from openai import OpenAI

client = OpenAI(base_url="https://api.gemmaapi.top/v1", api_key="YOUR_KEY")

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Outline a short mystery story in five beats."}],
    stream=True,
    stream_options={"include_usage": True},
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Streaming uses server-sent events and reports token usage at the end. The same call in Node:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.gemmaapi.top/v1",
  apiKey: process.env.API_KEY,
});

const res = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Give me three names for a fantasy tavern." }],
  temperature: 0.9,
});
console.log(res.choices[0].message.content);

And plain curl, which is useful for checking that a key works:

curl https://api.gemmaapi.top/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"ping"}]}'

Features at a glance

FeatureDetail
Context window100,000 tokens, prompt plus completion
StreamingSSE with stream: true, usage at the end
Tool callingtools, tool_choice, streamed tool_calls, results as role: "tool"
JSON moderesponse_format with type json_object
Samplingtemperature, top_p, stop, seed and the penalties are passed through
Max body8 MB
Output lengthUses the rest of the window; max_tokens is optional

Responses carry X-Request-Id and X-Balance-USD, plus X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency so your client can read its own limits instead of hard-coding them.

Pricing in plain numbers

You pay per token from prepaid credit: $0.15 per 1M input tokens and $0.50 per 1M output tokens. There is no subscription and credit never expires. Failed or refused requests are not charged.

A chat message with a 1,500-token prompt and a 500-token reply costs 1,500 x $0.15 / 1,000,000 = $0.000225 for input plus 500 x $0.50 / 1,000,000 = $0.00025 for output, so $0.000475 in total. A thousand such messages cost $0.475. A roleplay session of 200 turns with a growing history costs more because the history is resent each time, but at these rates it usually stays in cents.

Top-ups are any whole amount from $20 to $500 with bonuses of +5% from $50, +10% from $100 and +15% from $200. You can pay by crypto (USDT on TRC20, USDC on Base). The pricing page shows the details. Before topping up, new users can claim a $0.50 trial credit with one click on the API key page. It is valid for 7 days and needs no card.

Moving an existing project over

Most migrations are a configuration change. If your code already talks to an OpenAI-style endpoint, you change the base URL, the key and the model name, then run your test prompts. Many tools read these from environment variables, so you may not touch the code at all.

  1. Create a key on the API key page.
  2. Point your client at the new base URL and set the model to uncensored.
  3. Call GET /v1/models once to confirm the connection.
  4. Run ten of your real prompts and compare the answers with what you get today.
  5. Check usage in the responses and multiply by the two token rates to see your cost per task.

Expect differences. A different model follows instructions in its own way, so a system prompt tuned for another model may need small edits. Sampling settings such as temperature and top_p carry over, but the best values can differ, so test a few. If your app relies on tool calling, run a round trip early: send the tool result back as a message with role: "tool" and confirm the final answer uses it.

Keep your old provider configured as a fallback while you test. Switching a feature flag back is cheaper than debugging in production.

A tool call, end to end

Tool calling is the feature people ask about most, so here is a complete loop. The model asks for a function, you run it, and you send the result back.

import json
from openai import OpenAI

client = OpenAI(base_url="https://api.gemmaapi.top/v1", api_key="YOUR_KEY")

tools = [{
    "type": "function",
    "function": {
        "name": "get_weather",
        "description": "Current weather for a city",
        "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"],
        },
    },
}]

messages = [{"role": "user", "content": "Is it raining in Lisbon?"}]
first = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
msg = first.choices[0].message
messages.append(msg)

for call in msg.tool_calls or []:
    args = json.loads(call.function.arguments)
    result = {"city": args["city"], "conditions": "light rain"}
    messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})

final = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
print(final.choices[0].message.content)

The weather result here is a stub. In a real app, call your own service and return its data. If the model answers directly without calling the tool, that is allowed; check msg.tool_calls before you loop, as the code above does, and use tool_choice when you need to force a call.

Limits you should plan for

A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 and 60. Past the per-minute cap you get HTTP 429 with the code rate_limited, and past the concurrency cap you get 429 with the code concurrency. On temporary overload the API also answers 429 with Retry-After: 5.

Streaming deserves attention here: a streamed request keeps its concurrency slot until the stream finishes. An app that opens many long streams can hit the concurrency limit well before the request-rate limit. Cap your worker pool at the number your key allows and retry on 429 after the delay in the header.

Who it suits and who should look elsewhere

It suits developers building chat, character, writing or agent features who want an OpenAI-style endpoint with fewer refusals, simple prepaid billing and no hardware. It also suits anyone who wants to test a new model without rewriting integration code.

It is a poor fit if you need an official vendor model for compliance reasons, if you need multimodal input or output, or if you require embeddings or fine-tuning. In those cases, use a service that offers them and check their current pricing and terms. For a longer walk-through of the integration steps, read the integration guide.

Prompts are not used for training. Sexual content involving minors is never allowed, and requests that try it will not be served.

Questions and answers

Is this Google's official API?

No. It is a hosted open-weight model from an independent provider, reached through an OpenAI-compatible endpoint. It is not the official API of any model vendor.

Can I use the OpenAI SDK?

Yes. Set the base URL to https://api.gemmaapi.top/v1, use your key, and send the model ID uncensored.

Does it support images or embeddings?

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

How is it billed?

Per token from prepaid credit: $0.15 per 1M input and $0.50 per 1M output tokens. There is no subscription.

Is there a free trial?

New users can claim $0.50 of trial credit with one click on the API key page. It lasts 7 days and needs no card.

Your key is one form away

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