it ▾
Open account

Unfilter gpt API Reference

Integrate our uncensored LLM API in minutes using standard OpenAI client libraries. Change one configuration line, pass your key, and receive text without content refusals for lawful adult use.

Base URL and Authentication

Your API key authenticates every request. The base URL points to our hosted endpoint, not a proxy. Pass your key in the Authorization header using the Bearer scheme. This setup works with any standard OpenAI-compatible SDK. You receive your key immediately after signing up with Google or email. No phone number is required for verification. The key is unique to your account. Use it to access the chat completions endpoint.

First Request

Send a POST request to the chat completions endpoint. Specify the model ID as uncensored. Include your system prompt and user message in the request body. The API returns a text response directly. You can control the output length with the max_tokens parameter. If you omit this parameter, the default limit is 2,048 tokens. The system processes your input and generates a completion. Errors are free, so you only pay for successful token usage. Verify your credentials before sending large payloads.

curl https://api.unfiltergpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the current weather in Seattle"}]
  }'

Python SDK Integration

Install the official OpenAI Python library. Configure the client to use our base URL instead of the default OpenAI endpoint. Set your API key in the client initialization. Pass the model name uncensored in your completion call. The SDK handles the JSON serialization automatically. You can stream responses or retrieve them as a single object. This approach requires minimal code changes. Your existing logic for handling chat messages remains valid. Test with a simple query to confirm connectivity. Check the response object for usage statistics.

from openai import OpenAI

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

Node.js SDK Integration

Import the OpenAI Node.js package. Initialize the client with your base URL and API key. The base URL must point to our specific endpoint. Use the uncensored model ID for requests. The SDK manages the HTTP connections efficiently. You can send messages and receive text outputs. Error handling works similarly to the standard OpenAI implementation. The library supports both synchronous and asynchronous calls. Configure the timeout settings if needed. Ensure your environment has the necessary dependencies installed. Run a test request to validate the configuration.

import OpenAI from "openai";

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

Streaming Responses and Token Usage

Enable streaming by setting the stream parameter to true. The API returns data chunks as they are generated. Each chunk contains partial text and usage metadata. The final chunk includes the total token count for the request. This feature reduces perceived latency for long responses. You can process tokens in real-time. The SSE format is standard and widely supported. Parse the chunks to update your user interface. Monitor the token usage to track costs accurately. Streaming works with all standard parameters like temperature and top_p.

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

The context window supports up to 100,000 tokens for prompt and completion combined. You can send requests up to 8 MB in body size. Rate limits allow 300 requests per minute per key. If you exceed this limit, the API returns a 429 status code. A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. Top up using crypto to continue. Errors do not consume tokens. The model refuses sexual content involving minors regardless of other settings. Manage your requests to stay within these bounds.

Frequently asked questions

How do I get started with unfilter GPT?

Sign up with Google or email to receive your API key immediately. No phone number is required. Use the key with any OpenAI-compatible SDK to start sending requests.

What happens if I run out of credit?

The API returns a 402 status code. You can top up using USDT on TRC20 or USDC on Base. Credits never expire, so you can add funds whenever convenient.

Can I use this with existing OpenAI code?

Yes, the API is OpenAI-compatible. You only need to change the base URL and API key in your configuration. The model ID is <code>uncensored</code> instead of <code>gpt-4</code> or similar.

Get your API key instantly

Sign up, copy the key, update your base URL. Setup takes seconds.

Open account