EN ▾
Get API key

How to Run Uncensored AI Locally, or Use a Hosted API

Running an uncensored model on your own machine is possible and free of per-token fees, but it takes hardware and setup. Here are the steps, the memory math, and an honest look at the hosted alternative.

Updated

Home computer with a GPU and a cloud of servers joined by a cable, comparing local and hosted AI

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Key points

  • Local means an open-weight model file plus a runtime such as Ollama, LM Studio or llama.cpp.
  • Memory decides everything: a 4-bit model needs roughly half a byte per parameter, plus room for context.
  • Local gives full control and offline use; a hosted API gives a larger model and context with no hardware.
  • Both can sit behind the same OpenAI-style client, so switching is a base URL change.

What you need to run it locally

If you want to know how to run uncensored ai locally, the recipe has three parts: an open-weight model that was tuned not to refuse, a program that loads it, and a computer with enough memory to hold it. No account or key is involved, and nothing leaves your machine once the file is downloaded.

Start with the program, since it decides how painful the rest is. Ollama and LM Studio are the easy options: they download models for you, run them, and expose a local chat or an OpenAI-style server. llama.cpp is the lower-level engine that many tools build on, and it gives you the most control. All three read the GGUF file format, which is the common packaging for models shrunk to run on consumer hardware.

Then pick a model. Open-weight models are published on sites such as Hugging Face by their original labs and by community members who retrain or edit them. Models described as uncensored or abliterated are variants altered to cut down on refusals. Quality varies widely between uploads, so read the model page, check recent comments, and prefer files that many people use.

What uncensored means in practice

The word sounds bigger than it is. A standard chat model is trained to decline some requests, such as certain fiction themes, blunt medical or legal talk, or dark material in a story. An uncensored variant is tuned to cooperate with those requests instead of refusing. It is still software, it can still be wrong, and it is still subject to the law where you live.

Typical users are adults. Fiction writers, roleplay communities, companion apps for adults, and people who are tired of lectures in the middle of a draft are the typical audience. There is one rule that no setup changes: nothing sexual involving minors, anywhere, in any tool. A model that has had its refusals reduced does not change what is lawful or acceptable.

Step by step with Ollama

This is the shortest path on a recent laptop or desktop.

  1. Install Ollama from its website for macOS, Windows or Linux.
  2. Pick a model you trust from the Ollama library or import a GGUF file with a Modelfile. Smaller sizes load first; try one that fits in your memory with a few gigabytes to spare.
  3. Run it with ollama run model-name in a terminal. The first start downloads the weights.
  4. For your own apps, Ollama serves an OpenAI-compatible API at http://localhost:11434/v1. Use any placeholder string as the key, since the local server does not check it.

With LM Studio the steps are similar but graphical: search for a model, download a quantized build, press the load button, and switch on the local server. With llama.cpp you download or build the program, then start llama-server -m model.gguf -c 8192, which opens an HTTP server with the same style of API. The -c flag sets the context size, and as the next section shows, that number costs memory.

The memory math

A model is a pile of parameters, and each parameter has to sit in memory while the model runs. The size of the pile depends on precision, and quantization is how people make big models fit on small machines.

Model size16-bit weights4-bit weights
8 billion parametersabout 16 GBabout 4 GB
14 billion parametersabout 28 GBabout 7 GB
32 billion parametersabout 64 GBabout 16 GB
70 billion parametersabout 140 GBabout 35 GB

These are rules of thumb: 2 bytes per parameter at 16-bit, half a byte at 4-bit. Real files run somewhat larger. On top of the weights comes the KV cache, which grows with the context length you use, plus runtime overhead. A model that loads fine at an 8,000-token context can run out of memory at 32,000.

For speed, the weights should sit in GPU memory (VRAM) or, on Apple silicon, in unified memory. If they spill into ordinary RAM, generation slows to a crawl. As a starting guide, 8 GB of VRAM comfortably runs a 4-bit 8B model, and 24 GB opens up the 30B range.

Choosing a model without losing a weekend

The download list is long and most of it is noise, so use a short filter. First, match the size to your memory using the table above, and leave a few gigabytes of headroom for the context. Second, look at the file name for the quantization level. Names ending in Q4 are the common middle ground, Q5 and Q6 trade memory for a little more fidelity, and Q8 is close to the original but twice the size of Q4. Going below Q4 saves memory and starts to hurt the writing.

Third, test with your own task, not with a benchmark. Write one real prompt, for instance the opening scene of a story with three named characters and a constraint, and run it on two or three candidates. Watch for the failure modes that matter to you: forgetting names after a few turns, drifting out of the requested tone, or sliding into repetition. A model that handles your prompt cleanly at 8 billion parameters is better for you than a larger one that does not.

Finally, keep one model for a week before you swap. Judging a model on a single session is how people end up with a disk full of 20 GB files and no clear favourite.

Where local setups fall short

Local is not free, it is just billed differently. You pay with hardware, power, disk space and time.

  • Model size. What fits at home is usually smaller than what a hosted service can run. Small models write well enough for short scenes, but they lose track of long plots and instructions more often.
  • Context. Long context is expensive in memory, so most home setups run at 8,000 to 32,000 tokens. A hosted endpoint with a 100,000-token window can hold a whole novel draft or a very long chat history.
  • Speed. A laptop that generates a few words per second is fine for one person chatting, and painful for a batch job.
  • Concurrency. One GPU serves one or two requests well. If you are building an app for other people, local stops scaling quickly.
  • Maintenance. Runtimes, quantization formats and model files change often. Expect to re-download and re-test now and then.

When a hosted API is the simpler path

Hosted means someone else owns the GPUs. Our API at https://api.openainsfw.cc/v1 runs one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. The model ID is uncensored. It is not the official API of any model vendor and not a router across vendors. It is text only, with no image, audio or embeddings, and it offers streaming, tool calling and JSON mode.

Billing is per token from prepaid credit: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Writing a million tokens of output, about 750,000 words, costs $0.50. Failed or refused requests are not charged, credit never expires, and prompts are not used for training. Top-ups run from $20 to $500 in USDT on TRC20 or USDC on Base. The pricing page has the bonus tiers. You can test it first with the $0.50 trial credit, claimed in one click on the API key page after sign-up, valid for 7 days.

The trade-off is privacy of a different kind. Your prompts travel to a server, so if the material must never leave your device, run local. If you need a bigger model, a long context, or a backend for an app with several users, the hosted option removes the hardware question.

Use both with the same code

Because Ollama, LM Studio, llama.cpp and our API all speak the OpenAI chat format, one client can talk to any of them. Develop against a local model on a plane, then switch the base URL when you need the larger one.

import os
from openai import OpenAI

USE_LOCAL = False

if USE_LOCAL:
    # Ollama default address; the key can be any string
    client = OpenAI(base_url="http://localhost:11434/v1", api_key="local")
    model = "your-local-model-name"
else:
    client = OpenAI(
        base_url="https://api.openainsfw.cc/v1",
        api_key=os.environ["UNCENSORED_API_KEY"],
    )
    model = "uncensored"

resp = client.chat.completions.create(
    model=model,  # the hosted model ID is "uncensored"
    messages=[{"role": "user", "content": "Outline a heist story in five beats."}],
)
print(resp.choices[0].message.content)

Full first-request steps are in the quickstart. Limits on the hosted side are 8 concurrent requests and 300 per minute on a full key, and 2 and 60 on a trial key.

Which one should you pick

Your situationBetter fit
Private writing, no data may leave the deviceLocal
You already own a GPU with 16 GB or moreLocal to start, hosted when you need more
Long chats or documents beyond 32,000 tokensHosted
An app, bot or tool for other usersHosted
Laptop with 8 GB and a tight scheduleHosted
Offline use, travel, air-gapped workLocal

Neither choice is wrong. A common pattern is a small local model for private drafts and call a hosted endpoint for the heavy jobs.

Questions and answers

Can I run an uncensored model on a laptop?

Yes, if the model is small enough. A 4-bit model of around 8 billion parameters needs roughly 4 to 5 GB of memory, so an ordinary laptop with 16 GB of RAM can run it, although slowly without a GPU.

What is the easiest tool for beginners?

LM Studio and Ollama are the easiest. Both download models for you and can expose an OpenAI-compatible local server.

Is a local uncensored model private?

Once the model file is downloaded, prompts stay on your machine. A hosted API sends prompts to a server; ours does not use prompts for training.

Is your hosted model the same as the one I would run locally?

Not necessarily. We serve one open-weight model run by an independent provider. Local setups use whichever file you choose, and it is usually smaller.

Is there a hard limit on content?

Yes. Sexual content involving minors is never allowed, locally or on our API. Everything else is for lawful adult use.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.