Text API quickstart
Connect your NSFW video pipeline to an uncensored text engine with a single OpenAI-compatible endpoint. Generate scripts, prompts, and metadata without content filters or training on your data.
Base URL and Authentication
The text layer for your NSFW video workflows lives at https://api.ltxnsfw.top/v1. This is a standard OpenAI-compatible base URL, meaning you can reuse existing SDKs and clients. To authenticate, pass your API key in the Authorization header as a Bearer token. You generate this key immediately after signing up via Google or email on the Get API key page. No phone number or credit card is required for the initial sign-up. The key is tied to one account; issuing a new key replaces the old one instantly. Keep your key secure, as it draws from your prepaid crypto credit.
First Request
Send a standard chat/completions request to generate uncensored scripts or prompts. Specify the model uncensored to ensure the model answers without filtering adult themes. The base URL is https://api.ltxnsfw.top/v1. This endpoint handles text input and returns text output, serving as the prompt engineering engine for your video generation pipeline.
curl https://api.ltxnsfw.top/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."}]
}'This request demonstrates the basic structure. You can adjust the max_tokens parameter to control output length, keeping in mind that the prompt and the output share the 100,000-token window.
Python SDK Integration
Use the official OpenAI Python library to integrate the API into your scripts. Set the base_url and api_key environment variables or pass them directly. This allows you to programmatically generate NSFW scripts or captions for your video pipelines. The client handles JSON serialization and error parsing automatically. Remember that this API only handles text; you will need separate tools for image or video generation.
from openai import OpenAI
client = OpenAI(base_url="https://api.ltxnsfw.top/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 code snippet shows how to initialize the client and send a request. Ensure you are using a recent version of the openai package for full compatibility with streaming and JSON modes.
Node SDK Integration
For JavaScript and TypeScript pipelines, use the Node.js OpenAI SDK. Configure the client with your base URL and API key. This is ideal for server-side generation of prompts before they are sent to video models. The SDK supports all standard parameters like temperature and top_p. You can control the randomness of the output to get more creative or more deterministic results.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.ltxnsfw.top/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);This example shows a simple text generation call. You can extend this to include system instructions that define the tone or format of the generated script.
Streaming Responses
For long scripts or detailed prompt engineering, enable streaming via Server-Sent Events (SSE). This allows you to process tokens as they are generated, reducing perceived latency. The final chunk contains the token usage statistics for billing. Streaming is useful for building real-time preview interfaces or for piping text directly into other processing steps. It ensures you get the full output without waiting for the entire response to finish.
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)The code demonstrates how to iterate over the stream. Each chunk contains a delta with the generated text. Handle the end of the stream to process the final token count.
Rate Limits and Costs
Requests are limited to 300 per minute per key, with a concurrency limit of 8 requests at the same time. The request body must not exceed 8 MB. Errors and refusals are free. The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is topped up via crypto (USDT TRC20 or USDC Base) and never expires. A 401 error indicates an invalid key, 402 means no credit, and 429 indicates rate limiting. The context window is 100,000 tokens, and output can run to the end of the window.
Technical reference
One table with every limit, feature and price that applies to your key.
| Parameter | Details |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model | uncensored |
| Base URL | https://api.ltxnsfw.top/v1 |
| API key | Authorization: Bearer YOUR_KEY |
| Max context | 100,000 tokens, input and output combined |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Structured output | response_format: {"type": "json_object"} |
| Function calling | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Request size | 8 MB request body |
| 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 |
| Requests per minute | 300/min per key |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| Subscription | no monthly fee; paid credit does not expire |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Free trial | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Key management | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Sign-in | Google or e-mail and password |
Error codes
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
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 | temporary overload, retry shortly |
Questions and answers
What is the context window and max output?
The context window is 100,000 tokens for both prompt and completion combined. There is no separate output cap, and if you do not set the max_tokens parameter the response can run to the end of the window.
How do I top up my credit?
You can top up with USDT (TRC20) or USDC (Base) for amounts between $20 and $500. You receive a +5% bonus from $50, a +10% bonus from $100, and a +15% bonus from $200. No cards or PayPal are accepted.
Is this API uncensored?
Yes, the model does not refuse lawful adult, fictional, or controversial topics. However, it always blocks sexual content involving minors. It is not GPT, Claude, or any other vendor model.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.