EN ▾

unfilteredaiapi.comhttps://api.unfilteredaiapi.com/v1

Unfiltered AI

Raw, uncensored LLM API for developers.

Unfiltered AIGet API key

Unfiltered AI API Quickstart Guide

Use this guide to authenticate a Chat Completions request, inspect its reply and usage fields, and handle streaming and errors. Keep response validation and conversation storage in your application.

Base URL and Authentication

To use the unfiltered ai api, direct your requests to the dedicated base URL: https://api.unfilteredaiapi.com/v1. This endpoint is compatible with standard OpenAI SDKs and clients. You need an API key to authenticate. Sign up with an email and password on the Get API key page to receive your key immediately. The key is tied to one account but can be regenerated at any time, which revokes the previous key.

Pass your key in the Authorization header as a Bearer token. The model identifier you must send is uncensored, an open-weight model running on our own GPU servers. It is not GPT, Claude, or any other vendor's model.

First Request

Send a small Chat Completions request to verify authentication and response format. Inspect the message and token usage, and handle errors or refused output in the client.

curl https://api.unfilteredaiapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

If you receive a JSON response with a choices array, your configuration is correct. The API supports only text input and output; there are no embeddings, image, or audio endpoints.

Python SDK Integration

Use the official OpenAI Python library to interact with the uncensored api. Configure the base_url and api_key in your client initialization. This allows you to keep existing code structure while switching the underlying model behavior.

from openai import OpenAI

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

This approach works for any OpenAI-compatible client. Ensure you specify the model as uncensored in your requests. The API handles tokenization and response formatting according to the OpenAI schema.

Node SDK Integration

Configure the Node.js Chat Completions client with this API’s base URL, current key and model uncensored. Check the response format, streaming behavior and error paths before using it in a chat application.

import OpenAI from "openai";

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

Set the baseURL to https://api.unfilteredaiapi.com/v1 and provide your API key. The model parameter should be set to uncensored. This setup supports streaming and tool calling as described in subsequent sections.

Streaming Responses (SSE)

The API supports server-sent events (SSE) for real-time token generation. Set the stream parameter to true in your request. The response will be a series of chunks rather than a single JSON object.

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)

Handle the stream events to display text as it generates. This is useful for chat interfaces where latency matters. Each chunk contains partial content that you can append to your UI buffer.

Limits, Errors, and Context

Your requests are subject to a limit of 300 requests per minute per key. The request body must not exceed 8 MB. If authentication fails, you receive a 401 error. If your prepaid credit is exhausted, the API returns a 402 error. If you exceed the rate limit, you receive a 429 error.

The context window is 100,000 tokens for prompt plus completion. Ensure your inputs fit within this limit to avoid truncation. The uncensored api key can be regenerated to revoke access if needed.

Specs at a glance

Use this table to decide whether the API fits your project before you buy credit.

FeatureSupport
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Modeluncensored
Base URLhttps://api.unfilteredaiapi.com/v1
MethodsPOST /v1/chat/completions · GET /v1/models
AuthenticationAuthorization: Bearer YOUR_KEY
StreamingSupported (stream: true), usage included at the end
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Structured outputJSON object mode via response_format json_object
Max context100,000 tokens, input and output combined
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Parallel requestsup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300 requests per minute per key
Request size8 MB request body
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Subscriptionno monthly fee; paid credit does not expire
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Billingprepaid credit, charged by real token usage; errors and refusals are free
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Accountsign in with Google or with e-mail + password
Keysone key per account, regenerate any time (the old one stops working)

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The context window is 100,000 tokens, covering both the prompt and the completion. Ensure your total token count stays within this limit.

How do I handle rate limits?

You are limited to 300 requests per minute per key. If you exceed this, you will receive a 429 error. Consider implementing exponential backoff in your client.

Is the model GPT-4?

No. The model ID is 'uncensored'. It is an open-weight model running on our dedicated GPU servers, not GPT, Claude, or any other vendor's model.

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