EN ▾

Unlimited LLM API.

Start with free trial credit

With email and password, the key appears on screen immediately.

Get API key
Base URL
https://api.sansursuzapi.com/v1
Model
uncensored

Uncensored AI Chat: Build Your Own Chat with the API

Those looking for an uncensored AI chat usually want two things: the model should not reply with a refusal for every sentence, and the conversation should be under your control. With the API, you get both; you connect to a ready-made client or write a few dozen lines of code.

Advantages and Cost Analysis of Using Uncensored AI

Updated

Two abstract masks facing each other on stage with glowing speech bubbles between them, AI chat

Highlights

  • The API connects to clients like SillyTavern by entering the address and key, as it is OpenAI-compatible.
  • To write your own chat, streaming, history list, and system instruction are sufficient.
  • The model is configured not to produce refusals for legal adult use; sexual content involving minors is prohibited.
  • The cost of a chat turn is measured in fractions of a cent.

What do we mean by uncensored?

What is meant here is not lawlessness. The model is a single open-weight model configured to answer without content refusal for legal adult use. In tasks like fiction, roleplay, adult character chat, and dark-themed story writing, you are less likely to encounter the "I can't do that" response. There is a hard limit: sexual content involving minors is never produced and is prohibited under any circumstances.

Know two limitations from the start. The API is text only: it does not generate images, audio, or video. Also, the model itself is not infallible on every topic; being uncensored does not mean it provides correct information. It is up to you to check answers on medical, legal, or financial topics. For the general framework, you can look at the uncensored AI page.

Two ways: ready-made client or your own code

Pre-built clientYour own code
SetupEnter address and keyA few minutes of scripting
Ready-made characters, interfaceIt comes readyYou write it
ControlAs much as the client providesFull: history, rules, log
Suitable forRoleplay, daily chatBot, application, automation

If you just want to chat, a pre-built client is more practical. If you are building a Telegram bot, a game, or a chat box on your own site, you will write code. Both use the same API.

Connect to the ready-made client

Tools like SillyTavern allow you to add a custom OpenAI-compatible endpoint. Since menu names may vary from version to version, we do not list click-by-click steps; the general steps are as follows:

  1. In the client's API connection settings, select the chat completion (chat completion) type and the custom OpenAI-compatible source.
  2. Write https://api.sansursuzapi.com/v1 in the address field.
  3. Paste the key you obtained from the key page into the key field.
  4. Enter uncensored as the model name and test the connection.

If the settings screen is different, check the tool's own documentation; the section you are looking for is usually listed under "custom OpenAI endpoint" or a similar name. If the connection fails, the most common reason is that the /v1 part at the end of the address is missing or extra. Also make sure there is no space before the key.

Writing your own chat: streaming and history

For a chat that runs in the terminal and writes the answer character by character, the following code is sufficient. It keeps the history in a list, limits it to the last 10 turns, and retries on temporary errors:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.sansursuzapi.com/v1",
    api_key=os.environ["API_KEY"],
    max_retries=5,
)

SISTEM = (
    "Sen Mira adında, esprili bir hikâye anlatıcısısın. "
    "Türkçe konuş, cevapların kısa ve canlı olsun."
)
MAX_TUR = 10
gecmis = []

while True:
    kullanici = input("> ")
    if kullanici.strip() == "/cikis":
        break
    gecmis.append({"role": "user", "content": kullanici})
    mesajlar = [{"role": "system", "content": SISTEM}] + gecmis[-2 * MAX_TUR:]

    akis = client.chat.completions.create(
        model="uncensored",
        messages=mesajlar,
        stream=True,
        temperature=0.9,
    )
    parcalar = []
    for p in akis:
        if not p.choices:
            continue
        metin = p.choices[0].delta.content or ""
        print(metin, end="", flush=True)
        parcalar.append(metin)
    print()
    gecmis.append({"role": "assistant", "content": "".join(parcalar)})

Instead of hardcoding the key, we read it from an environment variable. It is enough to run export API_KEY=... before execution. If you want to test the same request from the terminal, curl -N shows the stream live:

curl -N https://api.sansursuzapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","stream":true,
       "messages":[{"role":"user","content":"Bana iki cümlelik bir korku hikâyesi yaz."}]}'

Settings that determine chat quality

System prompt

Write the character, tone, and rules into the system message. Clear sentences like "Give short answers", "Advance the scene in one paragraph", "Do not speak for the user" yield better results than long descriptions. Remember that the prompt is sent with every request; if you bloat it, you pay for it every turn.

temperature and top_p

In creative chats, a temperature between 0.8 and 1.0 adds variety. For consistency, go down to around 0.5. Do not adjust both top_p and temperature together; keep one fixed and change the other. You can provide seed to see the same result again.

History trimming

The code above sends the last 10 turns. Since older turns are deleted, the model may forget the character's initial details. As a solution, you can add important information (character name, location, previous events) as a short note in the system message, or have the model summarize the old part in between. The context window is 100,000 tokens, so it is more than enough for most chats; the main reason for trimming is cost and speed.

Use cases beyond chat

The same infrastructure is not limited to chat. It can be used as a narrator in a story app for adult readers, as a character the player talks to in a game, or as a persistent character in a dating app. All of these should remain within the scope of fiction and legal adult use.

Getting the answer as JSON in the game character example simplifies the task; both dialogue and the character's mood go directly into the game:

import json, os
from openai import OpenAI

client = OpenAI(base_url="https://api.sansursuzapi.com/v1", api_key=os.environ["API_KEY"])

r = client.chat.completions.create(
    model="uncensored",
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": 'Sen bir tavernacı karakterisin. Sadece JSON döndür: {"soz": "...", "ruh_hali": "..."}'},
        {"role": "user", "content": "Geceyi burada geçirebilir miyim?"},
    ],
)
veri = json.loads(r.choices[0].message.content)
print(veri["soz"], veri["ruh_hali"])

Even in JSON mode, you must write which fields you want in the prompt; enabling the mode guarantees the format but does not define the field names. For long-lived characters, it works well to keep the character's static information in the system message and the changing state (health, inventory, relationships) as a separate short summary.

How much does a chat cost?

Assume that the system prompt is 300 tokens, the user writes 100 tokens per turn, and the model answers with 250 tokens. The history is resent with every turn, so each turn adds 350 tokens to the history. In a 20-turn chat:

  • Input: 20 × 400 + 350 × (0 + 1 + ... + 19) = 8,000 + 350 × 190 = 74,500 tokens.
  • Output: 20 × 250 = 5,000 tokens.
  • Cost: 74,500 × 0.15 / 1,000,000 = $0.011175; 5,000 × 0.50 / 1,000,000 = $0.0025.
  • Total: approximately $0.0137.

If you limit the history to the last 10 turns, the input becomes 58,750 tokens (19,750 in the first 10 turns, 3,900 each in the subsequent 10 turns). The cost is 0.0088 + 0.0025 = approximately $0.0113. The difference seems small, but it grows in long, day-long conversations. All plans are on the pricing page; the calculation formula is $0.15 per million tokens for input and $0.50 for output. You are not charged for failed or rejected requests.

Limits, errors, and privacy

The full key accepts 8 concurrent requests and 300 requests per minute; for the trial key, these are 2 and 60. If you open a chat bot to many users, you may get 429. If the error code is rate_limited, it indicates the per-minute limit; if it is concurrency, it indicates too many concurrent requests. In case of temporary load, the Retry-After: 5 header is sent; waiting five seconds and retrying is sufficient. A streaming request holds a slot until the stream ends; even if the user closes the page, make sure to close the connection.

The requests you send are not used for model training. Still, do not share your key, and if you store chat logs, let your users know. Detailed fields and examples are in the documentation.

Balance is topped up only with crypto (USDT on TRC20, USDC on Base), between $20 and $500. To get started, the $0.50 free trial credit obtained with a single click after registration is enough for initial tests; with the calculation above, you can run approximately 36 chats of 20 turns each ($0.50 / $0.0137).

Other guides

Frequently Asked Questions

Is filterless AI chat completely unlimited?

No. The model answers without content rejection for legal adult use, but sexual content involving minors is strictly prohibited. The API also generates text only.

Can I use it without coding?

Yes. It is enough to enter the address, key, and model name into a client that accepts an OpenAI-compatible endpoint. Since setting names may vary, check the tool's own documentation.

Does the API store chat history?

No, you send the history with every request. Therefore, you need to keep the list in your own application and shorten it if necessary.

What model name should I write?

Write uncensored in the model field.

Is trying it paid?

After registration, you can get a $0.50 free trial credit with a single click. No payment information is required, and the credit is valid for 7 days.

Your key is just one form away

Create an account, copy the key, and change the base URL. That's all there is to the setup.

Get API key