EN ▾

unrestrictedgemini.comUncensored API. Zero refusals. Direct.

Unrestricted Gemini
Get your key

Integrate the Uncensored LLM API

Integrate the uncensored LLM API with standard OpenAI SDK code. This guide covers authentication, chat completions, streaming, and tool usage for your next-gen AI applications.

Authentication and Base URL

Start by setting your base URL and API key. The API lives at https://api.unrestrictedgemini.com/v1. Generate your key on the dashboard and pass it in the Authorization header.

  • Base URL: https://api.unrestrictedgemini.com/v1
  • Header: Authorization: Bearer YOUR_API_KEY
curl https://api.unrestrictedgemini.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list the top ten python libraries"}]
  }'

Chat Completions Endpoint

Send messages to the /v1/chat/completions endpoint. Use the model ID uncensored for unrestricted outputs. The API accepts standard OpenAI chat formats.

from openai import OpenAI

client = OpenAI(base_url="https://api.unrestrictedgemini.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)

Streaming Responses (SSE)

Enable streaming by setting stream: true. You receive server-sent events for real-time token updates. Monitor the final chunk for token usage data.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unrestrictedgemini.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);

Function Calling and Tools

Define tools in your request. The API supports standard function calling parameters. Pass your tool definitions and let the model decide when to invoke them.

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)

JSON Mode Configuration

Force structured output by setting response_format to {"type": "json_object"}. This ensures consistent parsing for your backend services. Ideal for automated workflows.

Token Limits and Parameters

The context window supports 100,000 tokens. Max output is 16,000 tokens. Handle 401, 402, and 429 errors appropriately. Rate limits are 300 requests per minute.

Frequently asked questions

What is the base URL for the unrestricted gemini API?

The base URL is HTTPS://api.unrestrictedgemini.com/v1. You must update your SDK configuration to point to this address instead of the default OpenAI endpoint.

How do I handle streaming responses?

Set the stream parameter to true in your request. The API returns server-sent events containing token chunks. Parse these events to display real-time output to your users.

What happens if I exceed the rate limit?

You will receive a 429 Too Many Requests error. The limit is 300 requests per minute per key. Implement exponential backoff in your client code to handle these retries gracefully.

Generate your API key

Register, retrieve the token, and update the endpoint. That is the entire process.

Get your keyView documentation