NSFW Search: Quickstart Guide
Get your first uncensored text completion in under a minute using our OpenAI-compatible API. This guide covers authentication, basic requests, streaming, and the specific limits of our 100k context window.
Uncensored LLM API for developers
Base URL and Auth
Start by generating an API key on the Get API key page. You can sign up with Google or an email and password; no phone number is required. Your key is displayed immediately and is the only active key for your account.
Configure your client to point to our base URL: https://api.nsfwsearch.cc/v1. Pass your key in the Authorization header as Bearer YOUR_API_KEY. This setup works with any standard OpenAI-compatible SDK. Remember, this is a pure text API; we do not offer image generation, embeddings, or fine-tuning endpoints.
Basic Completion Request
Send a POST request to /v1/chat/completions to receive text output. The model ID is uncensored. This open-weight model is tuned to answer without content refusals for lawful adult use. You can send up to 8 requests simultaneously per key.
The request body requires model, messages, and your content. If you do not set max_tokens, the response can run to the end of the window. Ensure your total prompt plus completion stays within the 100,000 token context window.
The response returns standard OpenAI-compatible JSON, including token usage and the generated text.
Python SDK Integration
Use the official OpenAI Python library to interact with our uncensored API. Set the base_url to our endpoint and provide your API key. This allows you to keep your existing code structure while switching the underlying model behavior.
Make sure to handle exceptions appropriately, as network errors or invalid keys will raise standard HTTP errors. Our API supports standard parameters like temperature and top_p to control creativity and randomness.
Node SDK Integration
For JavaScript developers, the Node OpenAI SDK works seamlessly with our endpoint. Initialize the client with your base URL and key. This approach is ideal for server-side generation in Express, Next.js, or any Node environment.
You can stream responses or handle full JSON objects depending on your use case. The model ID remains uncensored. This ensures consistent behavior across your frontend and backend services without needing custom parsers for our specific response format.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) chunks. Each chunk contains partial text and token usage data.
This is useful for real-time UI updates. Note that token usage information is included in the last chunk of the stream. Streaming works with all standard parameters, including stop sequences and seed for reproducibility.
Limits, Errors, and Context
We enforce a rate limit of 300 requests per minute per key. If you exceed this, you will receive a 429 error. Requests are limited to 8 MB body size. A 401 error indicates an invalid or missing key, while a 402 error means your prepaid credit is exhausted.
Your credit never expires. Errors and refusals are free. The only hard content limit is no sexual content involving minors. For other lawful adult topics, the model generally responds without refusal. Context window is 100k total tokens.
cURL
curl https://api.nsfwsearch.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."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwsearch.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwsearch.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);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)API facts in one table
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Item | Value |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Authentication | Bearer token in the Authorization header |
| Base URL | https://api.nsfwsearch.cc/v1 |
| Model ID | uncensored |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | response_format: {"type": "json_object"} |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Rate limit | 300/min per key |
| Concurrency | 8 requests at the same time per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Request size | up to 8 MB per request |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Credit expiry | no monthly fee; paid credit does not expire |
| Free trial | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Account | sign in with Google or with e-mail + password |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Keys | one key per account, regenerate any time (the old one stops working) |
Error codes
Every error is JSON with a type you can switch on. You are never charged for an error.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
What happens if I make a mistake with my request?
Errors such as bad JSON or network issues are free and do not consume your prepaid credit. If you experience a double charge or other billing error, use the Support page to resolve it. Credit is non-refundable but never expires.
Does this API support function calling?
Yes, you can use the tools and tool_choice parameters in your request body. The model supports standard tool definitions and can output structured JSON when requested via response_format.
Is there a free tier or monthly subscription?
No. We use a prepaid credit model. You top up with USDT (TRC20) or USDC (Base) in amounts between $20 and $500. You get a $0.50 trial credit for new accounts, valid for 7 days. Claim this credit with one click on your API key page.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key