EN ▾
Create key
gptuncensored.ccOpenAI-compatible API, no refusals, pay per token.

Uncensored gpt API Reference

Start generating uncensored content immediately with our OpenAI-compatible API. Change your base URL, set your key, and send requests without subscription locks.

Base URL and Authentication

Point your client to HTTPS://api.gptuncensored.cc/v1 and pass your key in the Authorization header. This single endpoint handles all text generation without requiring additional configuration for embeddings or image processing. You receive a key immediately after signing up with Google or email, so you can begin testing within minutes. The API key authenticates every request, and you can regenerate it if needed, though only one active key per account is allowed.

First Request with cURL

Send a simple POST request to /v1/chat/completions to verify your setup. This curl command demonstrates the minimal structure required to receive a response from the uncensored model. Replace YOUR_API_KEY with the key generated on your dashboard. The model ID "uncensored" ensures you are hitting the dedicated endpoint without safety refusals for lawful adult content.

curl https://api.gptuncensored.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list the pros and cons of using Rust for backend systems"}]
  }'

Python SDK Integration

Use the official openai package with a custom base_url to integrate seamlessly. This approach allows you to keep your existing code structure while switching to our uncensored endpoint. Set the api_key and base_url explicitly in your client initialization. The model parameter must be set to "uncensored" to ensure correct routing. This method works with standard OpenAI SDK versions, making migration straightforward for developers already using Python clients.

from openai import OpenAI

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

Node SDK Integration

Initialize the OpenAI client with your base URL and key in Node.js environments. This setup mirrors the Python approach, ensuring consistency across different programming languages. You can pass the model ID "uncensored" directly in your completion calls. The client handles authentication headers automatically once configured. This integration supports standard parameters like temperature and top_p, allowing you to fine-tune the output style.

import OpenAI from "openai";

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

Streaming Responses

Enable streaming by setting stream to true in your request body. The API returns Server-Sent Events (SSE) that you can parse token by token. This is ideal for real-time applications where you want to display output as it generates. The final chunk contains the complete token usage statistics for billing. Streaming reduces perceived latency for users, making the uncensored model feel more responsive during long roleplay sessions or data extraction tasks.

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)

Limits, Errors, and Context Window

Expect a 401 error if your key is invalid, a 402 if you have no prepaid credit, and a 429 if you exceed 300 requests per minute. The context window supports 100,000 tokens total, with a maximum output of 16,000 tokens per request. Request bodies cannot exceed 8 MB, and you can run up to 8 concurrent requests per key. Errors and refusals do not consume your prepaid credit, so you only pay for successful token generation. This transparent pricing model ensures you know exactly what you are paying for without hidden tier limits.

Support & answers

Is this the official GPT API?

No, we are an independent provider running our own uncensored model. We are compatible with the OpenAI API format, so your existing code works, but we do not serve GPT, Claude, or other vendor models. Check the vendor's own documentation for their specific model details.

What happens if I get a 402 error?

A 402 error means your prepaid credit is exhausted. You can top up using USDT (TRC20) or USDC (Base) with amounts between $20 and $500. Credits never expire, so you can add funds whenever you need them without monthly subscription fees.

How does the context window work?

The model supports a 100,000 token context window, which includes both the prompt and the completion. You can request up to 16,000 tokens in a single output. If you do not set max_tokens, the default limit is 2,048 tokens. This allows for extensive context handling while maintaining performance.

Generate your key instantly

Register, copy the key, update the base URL. Complete integration in three steps.

Create keyView documentation