EN ▾
Start now

API Documentation

Connect your existing OpenAI-compatible client to our uncensored LLM API. Use the standard chat-completions endpoint with our base URL and API key to generate text without content refusals.

Authentication

Your API key authenticates all requests to the server. Pass it in the Authorization header as a Bearer token. Sign up via Google or email to get your key instantly. You get $0.50 in trial credit valid for 7 days. Keep your key secure. One active key per account. Replacing it invalidates the old one immediately.

First Request

Send a POST request to the chat completions endpoint. Use the model ID "uncensored" for our specific model. The base URL is https://api.llamansfw.com/v1. This works with any standard OpenAI SDK. Replace YOUR_API_KEY with your actual key. The request body includes messages with roles and content.

Python Integration

Initialize the OpenAI client with our base URL. Set the API key in the environment or constructor. Call chat.completions.create() with the model and messages. This returns a completion object. Handle the response to extract the generated text. This approach keeps your code compatible with standard OpenAI patterns. Adjust the temperature for creative variations.

Node.js Integration

Import the OpenAI package. Configure the base URL to our endpoint. Pass your API key. Create a completion with the desired parameters. The client handles the HTTP request automatically. Parse the response to get the assistant's message. This method works seamlessly with existing Node.js applications. You can set streaming to false for standard responses.

Streaming Responses

Enable streaming by setting stream to true. The API returns chunks of text as they are generated. This reduces perceived latency for long responses. You can display text in real-time to users. The last chunk contains the token usage statistics. This feature works with both Python and Node SDKs. It is ideal for chat interfaces requiring immediate feedback.

Limits and Errors

The context window supports 100,000 tokens total. You can send up to 16,000 tokens per request. Errors return standard HTTP codes. A 401 indicates an invalid or missing key. A 402 means your prepaid credit is exhausted. A 429 signifies you hit the rate limit of 300 requests per minute. Your prepaid credit never expires. Errors do not consume tokens. Refusals are also free.

cURL

curl https://api.llamansfw.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the max context window size?"}]
  }'

Python

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

Frequently asked questions

What is the uncensored llama NSFW API?

It is a hosted, OpenAI-compatible API serving a single uncensored large language model. It generates text based on your prompts without refusing lawful adult content. You pay per token with prepaid credit. Errors and refusals do not cost anything.

How do I pay for the API?

Tops up use crypto only: USDT on TRC20 or USDC on Base. Minimum top-up is $20. You receive bonus credit for larger amounts. Your credit never expires.

Is there a free trial?

New accounts receive $0.50 in trial credit. It is valid for 7 days. You can test the API with the standard chat completions endpoint immediately after signup.

Get your API key

Register, copy the key, and update your base URL. Simple configuration.

Start now