EN ▾
Get API key

API Documentation

Start generating uncensored text with our OpenAI-compatible API by pointing your client to our base URL and using your API key. This quickstart guides you through authentication, sending your first request, and handling streaming responses with common SDKs.

Authentication and Base URL

Authenticate every request by passing your API key in the Authorization header. Our service uses a single base URL for all operations, ensuring you can switch from other providers without changing your core logic. Simply replace the default base URL in your client configuration with https://api.abliteratedgemma.com/v1 and inject your key. This works with any standard OpenAI-compatible SDK, allowing you to use the same client code for our uncensored model as you would for commercial giants.

Making Your First Request

Send a POST request to /v1/chat/completions with the model ID uncensored. The API accepts standard chat messages and returns text directly. Use the following cURL command to verify connectivity and receive a response immediately.

curl https://api.abliteratedgemma.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "fix syntax error in python loop"}]
  }'

This endpoint supports up to 100,000 tokens in the combined prompt and completion. If you do not specify a token limit, the model defaults to 2,048 output tokens. Ensure your requests stay within the 8 MB body limit to avoid truncation errors.

Using the Python SDK

Install the official OpenAI Python package and configure it to point to our base URL. This allows you to leverage familiar methods like chat.completions.create for synchronous requests. The following example demonstrates how to initialize the client and send a simple prompt to the uncensored model.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Remember that errors like 401 indicate an invalid key, while 402 means your prepaid credit is exhausted. Since we do not offer subscriptions, you must top up via crypto to continue using the service.

Using the Node.js SDK

Initialize the OpenAI Node.js client with the same base URL and API key structure. This enables you to integrate uncensored generation directly into your Node applications. The code snippet below shows the minimal setup required to start sending requests.

import OpenAI from "openai";

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

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

The Node SDK handles request serialization automatically, but you must still manage your own credit balance. Check the pricing page for current token rates and crypto top-up options.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns chunks of text as they are generated, allowing for lower latency in user-facing applications. Use this code to process the stream token by token.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Streaming works with both Python and Node clients. Each chunk contains partial text, and the final chunk includes the total token usage. This is ideal for chat interfaces where immediate feedback improves the user experience.

Limits and Error Handling

Monitor your request limits to avoid interruptions. You are allowed 300 requests per minute and 8 concurrent requests per key. If you exceed the rate limit, the API returns a 429 error. Always handle 401 errors by verifying your key and 402 errors by topping up your crypto credit. Our prepaid credit never expires, so you can pause usage without losing funds.

Context Window and Model Details

The model supports a 100,000 token context window, combining both input and output tokens. This allows for extensive conversation history or large document processing in a single request. The model ID is uncensored, and it runs on our own servers without content refusals for lawful adult content. Use this capacity to maintain long-term memory or process large datasets efficiently.

Common questions

Is this the official Gemma Abliterated API?

No, we are an independent provider running our own tuned uncensored model. We are not affiliated with the original Gemma Abliterated project but offer an OpenAI-compatible interface for similar use cases. Check their documentation for details on their specific model versions.

How do I top up my credit?

You can top up using USDT (TRC20) or USDC (Base) with amounts between $20 and $500. Bonus credit is added automatically for larger deposits, such as +5% for $50 or +15% for $200. Payments are processed via crypto only.

What happens if I run out of credit?

Requests will return a 402 error until you add more funds. Your existing credit never expires, so you can top up at any time to resume service. There are no monthly fees or subscription lock-ins.

Generate your API key

Register, retrieve your key, and update your endpoint. It takes seconds.

Get API key