EN ▾
Get API key

Gemma 4 Abliterated Ollama: Use a Hosted API Instead

If you run a Gemma 4 abliterated Ollama setup today, you can keep your client code and swap the endpoint for a hosted one. This guide shows the three-line change, what differs from a local box, and when staying local is the better call.

Updated:

Isometric illustration of a local computer connected by a data cable to a cloud server cluster

Key points

The short answer

Searches for gemma 4 abliterated ollama usually come from people who pulled a community-modified Gemma build into Ollama, liked that it stops refusing ordinary requests, and then hit the limits of their own machine: slow generation, a model that does not fit in VRAM, a laptop that sounds like a jet. A hosted API removes the hardware question without changing how your code talks to the model.

Ollama exposes an OpenAI-style endpoint at http://localhost:11434/v1. Our API uses the same request format, so any client that works against Ollama's compatibility layer works here after you change two values: the base URL and the key. The model name becomes uncensored. Nothing else in your chat loop, streaming code or tool definitions has to change.

One honest caveat up front. The hosted service runs a single open-weight model operated by an independent provider. It is tuned to answer without content refusals for lawful adult use, but we do not present it as any specific vendor's official model, and it will not be byte-for-byte identical to the GGUF file you have on disk. Expect similar behaviour, not the same outputs.

What actually changes when you leave Ollama

Ollama runs weights on your own GPU or CPU. A hosted API runs them on someone else's servers and charges per token. That single difference explains almost every other change.

TopicLocal OllamaHosted API
Endpointhttp://localhost:11434/v1https://api.gemmaabliterated.top/v1
AuthAny placeholder stringReal key, sent as Authorization: Bearer
Model nameWhatever tag you pulleduncensored
ContextSet by you (num_ctx), limited by memory100,000 tokens, prompt plus completion
CostHardware and powerPer token, from prepaid credit
ConcurrencyWhatever your GPU tolerates8 at once and 300 requests per minute on a full key
Works offlineYesNo

The context row deserves a second look. Many people run local models with a context of 4,096 or 8,192 tokens because a larger one eats VRAM through the KV cache. On the hosted side the window is 100,000 tokens, so long roleplay histories or big document prompts that you used to trim can stay intact. You still pay for every input token, so a long history costs more per request. The cost section below puts numbers on it.

Switching an existing client: three lines

Here is a typical local setup using the official OpenAI Python SDK pointed at Ollama.

from openai import OpenAI

client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
reply = client.chat.completions.create(
    model="gemma-abliterated:latest",
    messages=[{"role": "user", "content": "Summarise this scene in two lines."}],
)
print(reply.choices[0].message.content)

And the same call against the hosted endpoint. Only three values differ: base URL, key and model.

from openai import OpenAI

client = OpenAI(base_url="https://api.gemmaabliterated.top/v1", api_key="YOUR_KEY")
reply = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this scene in two lines."}],
)
print(reply.choices[0].message.content)

If you prefer environment variables, the OpenAI SDKs read OPENAI_BASE_URL and OPENAI_API_KEY, so you can switch between local and hosted without touching code. Keep two shell profiles or two .env files and load the one you need.

export OPENAI_BASE_URL="https://api.gemmaabliterated.top/v1"
export OPENAI_API_KEY="YOUR_KEY"
curl "$OPENAI_BASE_URL/models" -H "Authorization: Bearer $OPENAI_API_KEY"

The GET /v1/models call is a quick check that the key works; it should list uncensored. The full parameter reference lives in the API docs.

Front ends that already accept a custom endpoint

Most people who run Ollama do not write SDK code. They use a chat front end or a roleplay tool. The pattern is the same everywhere: find the setting for an OpenAI-compatible or custom endpoint, paste the base URL, paste the key, and type uncensored as the model.

  • SillyTavern lets you add an OpenAI-compatible chat completion source. Choose the custom option, enter the base URL and key, then set the model name by hand if the list does not populate.
  • Open WebUI can hold several connections at once. Keep your Ollama connection and add ours as a second OpenAI-style connection, so you can switch per chat.
  • Your own scripts built on LangChain, LlamaIndex or plain requests need only the base URL, key and model name.

Menu labels change between versions, so check the tool's own documentation if a field is named differently. If a front end insists on appending /chat/completions itself, give it the base URL ending in /v1 and nothing more. If it asks for the full path, use https://api.gemmaabliterated.top/v1/chat/completions.

Keeping both connections is a good habit. Local stays available for offline sessions and for tests you do not want to bill, and the hosted one handles the long, heavy sessions.

Streaming, tools and JSON mode carry over

Features people rely on in a local stack are available over the same wire format. Streaming uses server-sent events with stream: true, and usage figures arrive at the end of the stream. Tool calling works with tools and tool_choice, with results returned as role: "tool" messages. JSON mode is enabled with response_format: {"type":"json_object"}. Sampling controls such as temperature, top_p, stop, seed and the penalties are passed through.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Write a short opening for a noir story."}],
    temperature=0.9,
    top_p=0.95,
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Two things differ from local use. First, a streamed request holds one of your concurrency slots until the stream ends, so a UI that opens many streams and never closes them will hit the limit. Second, sampling options that are specific to llama.cpp or Ollama, such as mirostat or num_ctx in the options block, belong to those runtimes. Stick to the standard OpenAI parameters listed above and drop the rest.

Agent loops that call functions work the same way as they do against any OpenAI-compatible endpoint.

Cost: a worked example against owning the GPU

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit. There is no subscription, failed or refused requests are not charged, and credit never expires. See the pricing page for top-up amounts and bonuses.

Take a roleplay chat where each turn sends 2,000 tokens of history and persona and gets 500 tokens back.

  • Input: 2,000 tokens × $0.15 / 1,000,000 = $0.0003
  • Output: 500 tokens × $0.50 / 1,000,000 = $0.00025
  • One turn: $0.0003 + $0.00025 = $0.00055
  • 1,000 turns: 1,000 × $0.00055 = $0.55

The $0.50 trial credit therefore covers roughly 909 turns of that size (0.50 / 0.00055 = 909.09), enough to judge the output before you pay anything. If your history grows to 20,000 tokens, input cost per turn becomes 20,000 × $0.15 / 1,000,000 = $0.003, and a turn costs $0.00325 in total. Long contexts cost more, so summarise old turns when quality allows.

Whether this beats a local GPU depends on what you already own. If the card is sitting there and electricity is cheap to you, local inference has no per-token bill. If you are weighing a hardware purchase against pay-as-you-go use, divide the price of the card by the per-turn figure for your own usage pattern and see how many turns it represents.

Privacy and limits to know before you move

Running locally means prompts never leave your machine. That is a real advantage and a hosted service cannot match it. What we can say is narrower: prompts sent to this API are not used for training. If your material must never leave your own hardware, stay on Ollama. The myths versus facts article covers the same topic from another angle.

Limits on a full key are 8 concurrent requests and 300 requests per minute. A trial key gets 2 concurrent and 60 per minute. Past either limit you receive HTTP 429 with the code rate_limited or concurrency. On temporary overload you also get a 429 with a Retry-After: 5 header. Handle both by waiting and retrying.

import time
from openai import OpenAI, RateLimitError

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

def ask(messages, tries=4):
    for attempt in range(tries):
        try:
            return client.chat.completions.create(model="uncensored", messages=messages)
        except RateLimitError:
            time.sleep(5 * (attempt + 1))
    raise RuntimeError("still rate limited")

The model is text only, so there is no image, audio or video generation, no embeddings and no fine-tuning. Content for lawful adult use is the intended scope, and sexual content involving minors is not allowed under any circumstances.

Getting started in a few minutes

Sign in with Google or with email and password on the API key page, then claim the $0.50 trial credit with one click. It needs no card, is limited to one per person, and stays valid for 7 days. Paste the key into the snippet above, run the models call, then repoint your front end. Top-ups run from $20 to $500 in whole amounts, with a 5% bonus from $50, 10% from $100 and 15% from $200. You can pay by crypto (USDT on TRC20, USDC on Base).

Questions and answers

Can I use the Ollama Python or JavaScript client with this API?

The native Ollama clients speak Ollama's own protocol. Use an OpenAI SDK or any OpenAI-compatible client instead, and set the base URL to the hosted endpoint.

Is the hosted model the same file I run in Ollama?

No. It is one open-weight model run by an independent provider and tuned to answer without content refusals for lawful adult use. Expect similar behaviour, not identical output.

What model name do I send?

Send uncensored as the model value. The GET /v1/models call returns it, so you can confirm it with your key.

Can I keep Ollama for some chats and use the API for others?

Yes. Most front ends allow several connections, so you can keep the local one for offline use and add the hosted one for long or heavy sessions.

Are my prompts used for training?

No. Prompts sent to the API are not used for training.

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