繁中 ▾

API Documentation

Get started with the uncensored LLM API in minutes. Use standard OpenAI-compatible libraries to send text requests and receive unrestricted model responses.

Authentication & Base URL

Authenticate immediately after signup using your API key.

The base URL for all requests is HTTPS://api.bestnsfwllms.com/v1. Your API key acts as the bearer token for every endpoint. Generate your key via the "Get API key" page using Google or email credentials. Store it securely, as the first key replaces any existing active key on your account.

POST /v1/chat/completions

Send text requests using the standard chat-completions endpoint.

This endpoint accepts your prompt and returns a text response. You do not need a model choice; the system serves a single uncensored large language model configured for unrestricted content. Specify your input via the messages array and set the model ID to "uncensored". Errors and refusals consume no credit, ensuring you only pay for real token usage.

curl https://api.bestnsfwllms.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate ten distinct ideas for a cyberpunk visual novel with dark themes"}]
  }'

Python SDK Integration

Integrate directly using the official OpenAI Python library.

Point your client to our base URL and inject your API key. This approach works seamlessly with existing codebases designed for OpenAI endpoints. Adjust parameters like temperature or top_p to control output randomness. The library handles JSON serialization automatically, simplifying your development workflow.

from openai import OpenAI

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

Use the Node SDK for JavaScript or TypeScript environments.

Configure the base URL to route requests to our servers. This method is ideal for server-side applications or backend services requiring unrestricted text generation. You can pass standard parameters like stop sequences or seed values to ensure reproducible results. The SDK manages the HTTP connection and response parsing efficiently.

import OpenAI from "openai";

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

Enable streaming for real-time token delivery.

Set stream: true in your request to receive Server-Sent Events (SSE). Each chunk contains partial text until the final chunk includes token usage statistics. This feature reduces perceived latency for end-users by displaying output as it generates. Monitor the final chunk to track your prepaid credit consumption accurately.

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)

Rate Limits & Constraints

Respect the strict rate limits to ensure service stability.

You are allowed 300 requests per minute and 8 concurrent requests per key. The maximum request body size is 8 MB. The context window supports 100,000 tokens for prompt and completion combined. If you exceed limits, expect a 429 error. Authentication failures return 401, and insufficient credit returns 402. Errors during processing do not charge your prepaid balance.

FAQ

Is this the best NSFW LLM for unrestricted content?

Yes, our API serves a dedicated uncensored model that does not refuse lawful adult, fictional, or controversial topics. It is optimized for developers who need reliable text generation without content filters.

What is the LLM API pricing structure?

You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid via crypto, errors are free, and unused credit never expires. There are no monthly subscriptions or hidden egress fees.

Can I use this NSFW API for function calling?

Yes, the API supports function calling, JSON mode, and streaming. You can define tools and set <code>response_format</code> to <code>json_object</code> for structured outputs. Parameters like <code>temperature</code> and <code>top_p</code> are fully supported.

Get your API key

Register, copy your key, update the base URL. That is all.

Open account