Base URL and Authentication
Use the base URL https://api.nsfwchatbot.cc/v1 with the official OpenAI SDKs or any OpenAI-compatible client. Pass your API key in the Authorization header as a Bearer token. Your key is generated immediately upon signup via Google or email, with no phone number required. The API key is the sole credential for your account; generating a new key replaces the previous one. Ensure your client library is configured to use the correct base URL, as the default OpenAI endpoint will not work with this service.
curl https://api.nsfwchatbot.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'The model identifier is always uncensored. This is an open-weight model hosted on our servers, tuned for lawful adult content without refusals for controversial or fictional topics. It is distinct from GPT, Claude, or other vendor models. Requests are processed as standard text-in, text-out completions.
Python SDK Integration
Install the official openai package and initialize the client with your base URL and API key. Set the model to uncensored in your requests. The Python SDK handles parameter serialization efficiently. You can pass standard parameters like temperature, top_p, and stop directly. This approach works for both simple completions and more complex conversations using the messages array. Ensure you handle exceptions for rate limits or authentication errors gracefully in your application logic.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwchatbot.cc/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)The API supports function calling and JSON mode. You can define tools in the request body, and the model will return structured arguments if configured correctly. This makes it suitable for building agentic workflows or structured data extraction within your NSFW chatbot context.
Node SDK Integration
Use the openai npm package to integrate with Node.js applications. Configure the client with baseURL set to https://api.nsfwchatbot.cc/v1 and provide your API key. The Node SDK supports async/await patterns for clean asynchronous code. Pass the model name uncensored for all chat completion requests. This setup allows you to build responsive chat interfaces or backend processing pipelines that require uncensored outputs.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwchatbot.cc/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);Remember that the API key is tied to your account. If you need a fresh key, generate it from the dashboard, which will invalidate the old one immediately. The SDK handles retries and error parsing, but you should monitor your credit balance to avoid interruptions during high-traffic periods.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) with incremental chunks of text. This provides a better user experience for chat applications by showing tokens as they are generated. The final chunk includes the token usage statistics for billing and monitoring. Streaming reduces perceived latency, which is critical for interactive NSFW chatbot experiences where users expect immediate feedback.
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)Handle stream termination and errors carefully. If the connection drops, you may need to implement reconnection logic. The API does not support image or audio generation, so streaming is strictly for text tokens. Ensure your client library supports SSE parsing to correctly reconstruct the full response from the chunks.
JSON Mode and Function Calling
Use response_format: {"type": "json_object"} to force the model to output valid JSON. This is useful for structured data extraction or when integrating with other systems that require predictable formats. Function calling allows the model to execute predefined tools. Define your tools in the request, and the model will return arguments in a structured format. This enables complex workflows without post-processing the text output.
Parameters like temperature and top_p influence the randomness and diversity of the output. Adjust these values to balance creativity and consistency. For JSON mode, lower temperatures may improve structural validity. Always validate the output on the client side to ensure it meets your application's requirements.
Limits, Errors, and Context Window
The context window is 64,000 tokens total, with a maximum output of 16,000 tokens per request. If max_tokens is unset, the limit defaults to 2,048 tokens. Rate limits are 300 requests per minute and 8 concurrent requests per key. Requests exceeding these limits will receive a 429 error. Authentication errors (401) indicate an invalid or expired key. Insufficient credit results in a 402 error; top up with USDT (TRC20) or USDC (Base) to continue.
The request body size is limited to 8 MB. Errors and refusals do not consume credit. Content involving minors is always refused. Your prepaid credit never expires, and errors are free. Use the Support page to resolve billing issues like double charges. Keep your API key secure, as it is the sole identifier for your account and credits.