EN ▾
Get API key

API Documentation & Quickstart

Integrate our uncensored LLM API into your NSFW TTS pipeline with this quickstart guide. Use the standard OpenAI-compatible interface to generate scripts, prompts, and captions with zero refusals for lawful adult content.

Authentication & Base URL

Our API uses standard Bearer token authentication. You receive your key immediately after signing up via Google or email on the Get API key page. Include it in the Authorization header of every request.

The base URL is https://api.nsfwtts.com/v1. This allows you to use the official OpenAI SDKs or any compatible client by simply updating the base_url configuration. The model ID to use is uncensored, an open-weight model tuned for adult content without blocking lawful topics.

First Request

Start by sending a simple chat completion request. This demonstrates how to generate text for your TTS scripts or captions. The endpoint accepts standard parameters like temperature and top_p to control creativity.

Use the following curl command to test your connection and verify that your API key is active.

curl https://api.nsfwtts.com/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 Integration

For Python projects, configure the OpenAI client to point to our base URL. This allows you to leverage existing ecosystem libraries while accessing our uncensored model. Set the api_key and base_url before making any calls.

This snippet shows how to send a prompt and retrieve the generated text for your pipeline.

from openai import OpenAI

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

Integrate the API into your Node.js applications by initializing the OpenAI client with our specific base URL. This is ideal for server-side generation of NSFW scripts or dynamic caption text.

Ensure you handle the response correctly, as the model may return longer text sequences suitable for detailed voiceover scripts.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.nsfwtts.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 Server-Sent Events (SSE), delivering tokens as they are generated. This reduces perceived latency for your users.

The final chunk contains the total token usage for the request. This is useful for tracking costs in real-time within 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 & Context

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, you will receive a 429 error.

Common errors include 401 for invalid keys and 402 if your prepaid credit is exhausted. Errors and refusals are free. The context window is 100,000 tokens, with no separate output cap. Sexual content involving minors is always refused.

API facts in one table

Use this table to decide whether the API fits your project before you buy credit.

ItemValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.nsfwtts.com/v1
AuthenticationBearer token in the Authorization header
Modeluncensored
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Max context100,000 tokens, input and output combined
SSE streamingYes — server-sent events; the last chunk carries token usage
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
JSON moderesponse_format: {"type": "json_object"}
Requests per minute300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requests8 requests at the same time per key
Request size8 MB request body
Volume bonus+5% from $50, +10% from $100, +15% from $200
Subscriptionpaid credit never expires, no subscription
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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Billingprepaid credit, charged by real token usage; errors and refusals are free
Sign-inGoogle or e-mail and password
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone active key per account; a new key replaces the old one

Errors and what to do

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Do I need a credit card to start?

No. You can sign up with Google or email/password. New accounts receive $0.50 in trial credit valid for 7 days. Claim this credit with one click on your API key page. Top-ups require crypto (USDT or USDC) only.

Is this the same as GPT-4?

No. We host an open-weight model tuned for uncensored responses. It is not GPT, Claude, or any other vendor's model. It is designed specifically for high-volume, filter-free text generation.

What happens if I get rate limited?

You will receive a 429 error. You can retry after the window resets or upgrade your throughput by managing concurrent requests. Each key allows 300 requests per minute.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.