EN ▾
Get API key

Uncensored API billing for developers

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Prompts and scripts over one endpoint

Get your text completion API running in minutes with this quickstart guide for Ltx NSFW pipelines. We cover authentication, standard OpenAI-compatible requests, and streaming responses so you can integrate uncensored text models into your existing stacks.

Base URL & Auth

Start by configuring your client with the base URL https://api.ltxnsfw.cc/v1. This endpoint is fully compatible with the official OpenAI SDKs and any library that supports the OpenAI API standard. You will need an API key, which you can generate on our Get API key page using Google or an email password. Keep this key secure, as it authenticates all requests to the uncensored model.

Authentication is handled via the Authorization header. Pass your key as a Bearer token. Our API expects the header format Authorization: Bearer YOUR_API_KEY. Ensure you are using the correct key, as each account is limited to one active key at a time.

Send a Request

Make a standard POST request to the /v1/chat/completions endpoint. You must set the model field to uncensored. This model is an open-weight LLM tuned for lawful adult content without refusals. It is not GPT, Claude, or any other vendor model.

Include your system and user messages in the messages array. The API returns text completions. Errors and refusals do not consume your prepaid credit, so you can test freely. Below is a basic cURL example to get started.

curl https://api.ltxnsfw.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 SDK

Use the official openai Python package to interact with the API. Set the base_url to our endpoint and provide your API key. This approach allows you to leverage existing code structures while switching to our uncensored model.

The following example demonstrates how to initialize the client and send a simple chat completion request. This method is ideal for backend services or data engineering pipelines that process text sequentially.

from openai import OpenAI

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

For JavaScript and TypeScript developers, the Node SDK provides a clean interface for integration. Configure the client with the same base URL and API key as the Python example.

This approach is suitable for web servers or edge functions where you need to generate text on the fly. The SDK handles serialization and error parsing automatically. Ensure your environment supports the required Node version for the SDK you are using.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.ltxnsfw.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 Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE), allowing you to receive tokens as they are generated. This reduces perceived latency for end-users.

Each chunk contains a partial completion. The final chunk includes token usage statistics, which are used to calculate your prepaid credit deduction. Streaming is efficient for long-form content generation or interactive chat interfaces.

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 Window

Your API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. The context window is 100,000 tokens total (input + output). There is no separate output cap per request, and if max_tokens is not set, the response can run to the end of the window.

Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Credit is charged only for successful token generation; errors do not consume funds. Prepaid credit never expires, so you can top up via crypto (USDT TRC20 or USDC Base) at any time.

API specifications

If your tool speaks the OpenAI API, these are the details that matter.

ParameterDetails
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.ltxnsfw.cc/v1
Modeluncensored
API keyAuthorization: Bearer YOUR_KEY
Structured outputresponse_format: {"type": "json_object"}
Context window100,000 tokens (prompt + completion together)
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Concurrencyup to 8 in parallel per key
Requests per minute300 requests per minute per key
Credit expiryno monthly fee; paid credit does not expire
Trial credit$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
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
How you payprepaid credit, charged by real token usage; errors and refusals are free
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Keysone active key per account; a new key replaces the old one
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
AccountGoogle or e-mail and password

HTTP errors

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

StatusTypeReason
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_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Is this an official OpenAI service?

No, we are an independent service offering an open-weight uncensored model. Our API is compatible with the OpenAI format, so you can use their SDKs, but we do not serve GPT models.

How is billing calculated?

You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is charged only for successful completions; errors and refusals are free. Prepaid credit never expires.

What payment methods are accepted?

We accept crypto only: USDT (TRC20) or USDC (Base). Minimum top-up is $20. No cards, PayPal, or bank transfers are supported. New accounts receive $0.50 in trial credit.

Your key is one form away

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

Get API key
$0.50
trial credit