EN ▾
NSFW Image API

Uncensored text API for NSFW pipelines

Get API key
uncensoredapi.nsfwimage.top/v1

NSFW Image API Quickstart: Text Layer for Prompts

Get your uncensored text API key and start sending prompt engineering requests to the model in minutes. This quickstart covers authentication, basic completions, streaming, JSON mode, and function calling for your NSFW image pipeline.

uncensored#01

Authentication and Base URL

Our API is OpenAI-compatible, so you can use standard SDKs by pointing them to our base URL: https://api.nsfwimage.top/v1. You need an API key, which you get immediately after signing up with Google or email on the Get API key page. Pass the key in the Authorization: Bearer <key> header. If the key is invalid, you get a 401 error. If you have no prepaid credit, you get a 402 error. Credit is topped up via crypto (USDT on TRC20 or USDC on Base), with no card needed for the trial. The trial gives $0.50 valid for 7 days. Mistakes like double charges are fixed via the Support page; credit never expires but is not refunded.

Basic Chat Completion

Send a POST request to /v1/chat/completions with the model ID uncensored. The model is an open-weight LLM tuned to answer without content refusals for lawful adult use, making it ideal for prompt generation and captioning in NSFW pipelines. It is not GPT, Claude, or any other vendor model. The context window is 100,000 tokens, with no separate output cap. A hard limit applies: sexual content involving minors is always refused. Errors and refusals do not consume credit. Use this endpoint for text-in, text-out tasks like style description or metadata extraction.

Python SDK Integration

Use the official OpenAI Python SDK by setting the base URL and API key. This is the fastest way to integrate our uncensored text API into your Python-based NSFW image generation workflows. The SDK handles retries and JSON parsing automatically. You can stream responses or use JSON mode as needed. Remember that this is a text-only API; it does not generate images, audio, or video. Use it to prepare the prompts that your image generation model will consume. The model ID is uncensored, and you can control behavior with parameters like temperature and top_p.

Node SDK Integration

For Node.js developers, the OpenAI SDK works seamlessly by configuring the base URL to https://api.nsfwimage.top/v1. This allows you to build prompt generation APIs or post-processing scripts for your NSFW content pipeline. The SDK supports streaming, JSON mode, and function calling. Since our API is text-only, use it to extract metadata, generate captions, or refine prompts before sending them to an image generator. The model is uncensored for lawful adult content, ensuring you get the text you need without unexpected refusals. Check the official OpenAI documentation for Node.js SDK specifics, as our API follows their standard interface.

Streaming Responses

Streaming via SSE is supported. Token usage is reported in the last chunk. This is useful for real-time prompt generation or captioning in your NSFW image pipeline. The uncensored LLM returns tokens as they are generated, allowing you to display progress or process partial text. Streaming works with both the Python and Node SDKs. Remember that the model has a 100k context window and 16k max output. Streaming does not change the billing; you are charged for total input and output tokens. Errors during streaming are handled by the SDK, but you may need to check the final chunk for token counts.

JSON Mode and Function Calling

Use response_format: {"type": "json_object"} for structured output. This is critical for NSFW image pipelines where you need reliable JSON for prompt templates or metadata. The uncensored model supports JSON mode and function calling (tools). Function calling allows you to define tools that the model can invoke, useful for extracting specific attributes from text or generating structured prompt components. The model is not fine-tuned for a specific domain, so you may need to provide clear instructions. JSON mode ensures the output is valid JSON, reducing post-processing errors in your pipeline. Rate limits apply per key, so monitor usage if you are making many structured requests.

Rate Limits and Parameters

You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must be under 8 MB. If you exceed the limit, you get a 429 error. One active key per account; a new key replaces the old one. Parameters like temperature, top_p, stop, seed, presence_penalty, and frequency_penalty are supported. These allow you to control creativity and determinism. For NSFW image pipelines, setting a seed ensures reproducible prompt variations. The model is uncensored for lawful adult content, but sexual content involving minors is always refused. Use these parameters to fine-tune your prompt generation or captioning workflows.

cURL

curl https://api.nsfwimage.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."}]
  }'

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

Under the hood: specs

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

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
AuthenticationAuthorization: Bearer YOUR_KEY
Modeluncensored
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.nsfwimage.top/v1
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens (prompt + completion together)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Structured outputresponse_format: {"type": "json_object"}
StreamingSupported (stream: true), usage included at the end
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Requests per minute300 requests per minute per key
Concurrencyup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max body8 MB request body
How you payprepaid credit, charged by real token usage; errors and refusals are free
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
Bonus credit+5% from $50, +10% from $100, +15% from $200
Credit expiryno monthly fee; paid credit does not expire
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Keysone key per account, regenerate any time (the old one stops working)
Sign-inGoogle or e-mail and password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

HTTP errors

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

HTTPTypeWhat to do
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_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

#02
Is the trial credit valid forever?

No, the $0.50 trial credit is valid for 7 days. It is available to new users (one per person) with no card needed. Claim this credit with one click on your API key page. Prepaid credit you top up with crypto never expires.

Does the model refuse all adult content?

No, the model is uncensored for lawful adult, fictional, and controversial topics. However, there is a hard limit: sexual content involving minors is always refused. This applies to all requests regardless of the model's general uncensored nature.

How do I fix a double charge?

Mistakes like double charges are fixed through the Support page. Your prepaid credit is not refunded, but the issue will be resolved. Credit is topped up via crypto (USDT or USDC) and never expires.

Your key is one form away

#03

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