EN ▾
Open account

API Documentation

Get started with the best NSFW LLM model via our OpenAI-compatible API. Send text, receive uncensored responses without content filters blocking lawful adult content.

Base URL and Authentication

Your API key authenticates every request to the base URL https://api.bestnsfwllmmodel.com/v1. Include it as a Bearer token in the Authorization header. You can generate a key instantly by signing up with Google or email on the Get API key page. The system issues one active key per account, so use that single credential for all integrations.

First Request

Send a standard chat completion request to test the endpoint. The model id is uncensored. This returns text output without refusals for lawful adult topics.

  • Ensure your payload matches the standard OpenAI schema.
  • Use the model name exactly as specified.

The following cURL command demonstrates a minimal request:

curl https://api.bestnsfwllmmodel.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the top 5 models for roleplay."}]
  }'

Python SDK Integration

Integrate using the official OpenAI Python library. Configure the client with your key and base URL. This approach works for synchronous calls and simple scripts.

  • Install the library via pip.
  • Set the base URL to our API endpoint.

Here is the Python code to initialize the client:

from openai import OpenAI

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

Use the official OpenAI Node SDK for JavaScript or TypeScript projects. Set the apiKey and baseURL properties. This allows you to use familiar async/await patterns in your Node environment.

  • Install the package via npm.
  • Configure the client instance.

The following Node.js snippet shows the setup:

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns chunks as they are generated. This reduces perceived latency for long outputs. Token usage is reported in the final chunk.

  • Process SSE events client-side.
  • Handle partial text updates.

Use this streaming example for your application:

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)

Limits, Errors, and Context

The context window supports 100,000 tokens total. You can output up to 16,000 tokens per request. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. The rate limit is 300 requests per minute per key.

  • Monitor usage in your dashboard.
  • Handle HTTP error codes appropriately.

Common questions

What is the best NSFW LLM model for API integration?

Our API serves the uncensored model via a standard OpenAI-compatible endpoint. It handles text input and output without content refusals for lawful adult content. This eliminates the need for complex proxy setups.

How do I handle authentication errors?

A 401 status code indicates an invalid or expired API key. Ensure you are using the key generated from the Get API key page. Check that the Authorization header includes the Bearer token correctly.

What happens if I run out of credits?

The API returns a 402 status code when your prepaid credit is exhausted. You can top up with crypto (USDT on TRC20 or USDC on Base) via the dashboard. Credits never expire, so you can add funds whenever needed.