PT ▾
  1. NSFW Prompt
  2. Quickstart: Integrate the NSFW Prompt API

Quickstart: Integrate the NSFW Prompt API

Integrate our uncensored LLM with a single base URL change. Get your first response in minutes using standard OpenAI SDKs.

Configure Base URL and Authentication

The API acts as a drop-in replacement for standard LLM endpoints. Point your client to https://api.nsfwprompt.cc/v1 and set your API key in the authorization header. This key comes from your dashboard. No extra routing logic is required. You get an uncensored LLM that processes text directly. The setup takes seconds. Your requests go straight to the model without intermediate hops. This ensures consistent latency. You pay only for tokens used. Errors do not consume credits. The base URL is the only configuration change needed for compatibility.

Send Your First Request

Send a POST request to /v1/chat/completions with your messages array. The model ID is always uncensored. This returns text directly without refusal for adult content. You can generate dialogue or story content immediately. The context window supports 100,000 tokens total. This allows for long conversations or large documents. You do not need to manage complex routing. The endpoint handles the inference. You receive a standard JSON response. This works for any NSFW chatbot pipeline. The request body must stay under 8 MB. Errors are free. You only pay for successful token generation. Start simple. Test with a short prompt first.

Python SDK Integration

Use the official openai Python package. Set the base URL to our endpoint. Pass your API key from the environment. Call chat.completions.create with the model ID uncensored. This is the fastest way to integrate. Python developers get immediate results. The SDK handles the HTTP layer. You focus on prompt engineering. Adjust temperature and top_p for creativity. Use max_tokens to control output length. The default max output is 2,048 tokens. You can increase this up to 16,000. Streaming is available. JSON mode is supported. This setup works for local scripts or cloud functions. Keep your key secure. The API key replaces the standard OpenAI key.

Node.js SDK Setup

Install the openai Node package. Configure the base URL in the client options. Use the uncensored model ID. This integrates into existing Node applications quickly. Node developers get low-latency responses. The SDK manages the connection pool. You can handle multiple concurrent requests. The API allows 8 simultaneous requests per key. This is sufficient for most web applications. You can stream responses in Node as well. Error handling is standard. Timeouts behave predictably. The request body limit is 8 MB. This fits most JSON payloads. No extra configuration is needed for Node. The SDK version does not matter as long as it is OpenAI-compatible. Start your server. Test the endpoint. Verify the response format.

Handle Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Each chunk contains partial text. You can render output in real time. This is ideal for chat interfaces. The final chunk includes token usage data. You can track costs accurately. Streaming does not affect pricing. You pay for the same tokens. The context window remains 100,000 tokens. Streaming works in Python and Node. It reduces perceived latency. Users see text as it generates. This improves the user experience. Handle partial responses gracefully. Buffer the tokens. Concatenate them into the final string. The API ensures order. No reordering is needed. This is standard OpenAI streaming behavior.

Manage Tokens, Limits, and Errors

Monitor your token usage in the dashboard. The API charges per million tokens. Input is $0.15 per 1M. Output is $0.50 per 1M. Credits never expire. You can top up with crypto. Limits are 300 requests per minute. This prevents abuse. Errors return standard HTTP codes. A 401 means your key is invalid. A 402 means you need more credit. A 429 means you hit the rate limit. Wait and retry. The context window is 100,000 tokens. This includes both input and output. Plan your prompts accordingly. Large inputs reduce output capacity. Keep requests under 8 MB. This ensures fast processing. The uncensored model handles diverse content. No extra fees for adult themes.

cURL

curl https://api.nsfwprompt.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Describe the texture of the skin."}]
  }'

Python

from openai import OpenAI

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

Frequently asked questions

Is this an official OpenAI service?

No. It is an independent API using a different model. The ID is <code>uncensored</code>. It follows the OpenAI protocol but runs on our servers. Prices and limits differ from OpenAI. Check our pricing page for details.

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.

What is the context window?

The context window is 100,000 tokens total. This includes both your input and the model's output. The maximum output per request is 16,000 tokens. This allows for long conversations or large documents.

Get your API key in a minute

Sign up, copy the key, swap the base URL. That is all you need to do.