API Documentation
Get started with the uncensored LLM API by sending text requests to our OpenAI-compatible endpoint. Use any standard SDK to integrate this NSFW API into your applications immediately.
Base URL and Authentication
The API base URL is HTTPS://api.llmfornsfw.com/v1. You authenticate by including your unique API key in the request header. This key is generated immediately after you sign up via Google or email on the Get API key page.
Every request must include the Authorization header. The format is Bearer followed by your key. If the key is missing or invalid, the server returns a 401 Unauthorized error. Errors during processing do not consume your prepaid credit.
curl https://api.llmfornsfw.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a 200 word summary of the provided technical documentation."}]
}'- Keep your key secure.
- One active key per account.
- Generate new keys easily.
First Request
Send a POST request to /v1/chat/completions to generate text. The model identifier is "uncensored". This model answers without content refusals for lawful adult use, making it ideal for NSFW chatbot scenarios.
Include your messages in the body. The system returns text completions. You can adjust parameters like temperature for creativity. This setup works with any OpenAI-compatible client.
from openai import OpenAI
client = OpenAI(base_url="https://api.llmfornsfw.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)Ensure your payload matches the required schema. The API handles tokenization internally. You only send natural language. The response contains the generated text. Use this for RP or story generation.
Streaming Responses
Enable streaming by setting stream to true. The API sends Server-Sent Events. Each chunk contains partial text. This allows instant display of results.
Stream data reduces perceived latency. Users see text as it generates. The final chunk includes token usage details. This helps you track costs 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)Handle errors gracefully. Network issues may interrupt streams. Reconnect if necessary. The API supports high throughput. Monitor your request rate.
Function Calling and Tools
Use the function calling feature to define tools. Your model can invoke functions. This enables structured data extraction. Define tools in the message array.
The API supports tool_choice. You can force or allow function calls. This is useful for NSFW LLM API integrations needing structured output. Set the model to use tools.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.llmfornsfw.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);Parse the tool calls in your application. Execute the functions. Feed results back to the model. This loop enhances capabilities. It works with any compatible SDK.
JSON Mode
Set response_format to json_object. The model outputs valid JSON. This ensures consistent parsing. Use this for NSFW data processing.
JSON mode restricts the output. The model follows your schema. Errors in formatting are rare. Validate the output anyway. This adds reliability.
Combine JSON mode with function calling. You get structured data. This reduces post-processing work. It is efficient for developers.
curl https://api.llmfornsfw.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a 200 word summary of the provided technical documentation."}]
}'Test with simple prompts. Verify the JSON structure. Adjust temperature for stability. Low temperature ensures consistency.
Limits, Errors, and Context
The context window is 100,000 tokens. This includes prompt and completion. Max output is 16,000 tokens. Set max_tokens to control length.
Rate limits are 300 requests per minute. You can have 8 concurrent requests. The request body is max 8 MB. Exceeding limits returns a 429 error. Wait before retrying.
Errors like 402 indicate no credit. Top up with crypto. USDT or USDC works. Credit never expires. Check your balance regularly.
Common questions
What is the uncensored LLM model?
It is an open-weight model tuned for lawful adult use. It does not refuse controversial or NSFW topics. It is not GPT, Claude, or another vendor's model. Use it for unrestricted text generation.
Which payment methods do you accept?
Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.
Is the API openai compatible?
Yes, it uses the same endpoints. Change your base URL to ours. Use the official SDKs. The model id is "uncensored". Integration is straightforward for developers.
Get your key in minutes
Sign up, grab your key, and update the base URL. That is all you need to do.