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

NSFW AI API: Call an Uncensored Text Model

An NSFW AI API is a hosted text model that answers adult fiction and roleplay prompts without content refusals. Below: what that means in practice, and how to send a first request in a few minutes.

Last updated

Glass pipe carrying glowing chat bubbles from a server to a terminal, representing a hosted text API

What people mean by an uncensored text API

If you searched for an nsfw ai api, you probably want one thing: a model you can call from your own code that does not stop mid-story with a refusal. In Spanish and Portuguese the abbreviation is "IA" (inteligencia artificial, inteligĂȘncia artificial), which is why queries like "ia nsfw" are common. The need is the same in every language: fiction, roleplay and companion apps for adults, built on a model that follows the system prompt you wrote.

Mainstream hosted models are tuned to decline a wide range of requests. That is reasonable for a general assistant, but it breaks a story app. The model here is a single open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the official API of any big vendor, and it is not a router that forwards your call to somebody else's model.

You talk to it the way you talk to OpenAI: JSON over HTTPS, a bearer key, a messages array. Nothing about your client has to change except two strings.

What you are actually calling

Keep the facts in one place before writing code.

  • Base URL: https://api.nsfwia.com/v1
  • Model id: uncensored
  • Auth: Authorization: Bearer YOUR_KEY
  • Endpoints: POST /v1/chat/completions, POST /v1/responses and GET /v1/models
  • Context window: 100,000 tokens, prompt and completion together
  • Features: streaming over SSE, tool calling, JSON mode, and pass-through for temperature, top_p, stop, seed and the penalties

It is text only. There is no image, audio or video generation, no embeddings and no fine-tuning. If your product needs those, pair this API with other services for them.

Send your first request

Create an account, open the API key page and copy your key. New users can claim $0.50 of trial credit there with one click, valid for 7 days. Then run this:

curl https://api.nsfwia.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "You are a novelist writing for adult readers. Stay in character."},
      {"role": "user", "content": "Open a noir story set in a rainy port city."}
    ],
    "temperature": 0.9
  }'

The same call with the official Python SDK:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.nsfwia.com/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You are a novelist writing for adult readers."},
        {"role": "user", "content": "Open a noir story set in a rainy port city."},
    ],
    temperature=0.9,
)
print(resp.choices[0].message.content)

If the call returns text, you are done with setup. A 401 means the key is wrong or has a stray space. A 404 usually means the base URL is missing /v1.

Streaming and system prompts

Story and chat apps feel slow without streaming. Set stream: true and read the server-sent events as they arrive. Usage figures come at the end of the stream.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.nsfwia.com/v1",
  apiKey: process.env.NSFW_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "uncensored",
  stream: true,
  messages: [
    { role: "system", content: "You are the narrator of an adult interactive fiction game." },
    { role: "user", content: "Describe the tavern the player just entered." },
  ],
});

for await (const part of stream) {
  process.stdout.write(part.choices[0]?.delta?.content ?? "");
}

Because the model does not push back on the genre, the system prompt becomes the main control you have. State the setting, the tone, the point of view and the length you want. Put hard rules there too, such as "no content involving minors" or "stay inside the story". A clear system prompt does more for output quality than any sampling setting.

Structured output and tools

Apps often need data, not prose: a character sheet, an inventory, a list of choices for the player. Add response_format: {"type": "json_object"} and say in the prompt which keys you expect, and the reply will be a JSON object you can parse. For game logic, pass tools with function definitions. When the model answers with tool_calls, run the function in your code and send the result back with role: "tool". Both features work while streaming, so a narrator can describe a scene and call a dice-roll function in the same turn.

Keep each change small when you tune output. Move one setting at a time, such as lowering temperature for steadier prose or adding a presence penalty if the model repeats itself, then compare results on the same prompt with a fixed seed.

Writing prompts in Spanish or Portuguese

Nothing stops you from sending the system prompt and user turns in Spanish or Portuguese. Some developers keep the system prompt in English and let the user write in their own language, which keeps instructions stable while the story stays local. Others write everything in the user's language. Try both on your own sample scenes and compare, because we publish no language benchmarks and the right choice depends on your content.

The articles on this site are in English, but the API itself does not care which language the JSON contains. Our myths versus facts article covers common misunderstandings about uncensored models, including what "uncensored" does and does not mean.

Limits and cost

ItemValue
Input price$0.15 per 1M tokens
Output price$0.50 per 1M tokens
Full key8 concurrent requests, 300 requests per minute
Trial key2 concurrent requests, 60 requests per minute
Max request body8 MB

A typical roleplay turn with 2,000 input tokens and 500 output tokens costs $0.0003 for input plus $0.00025 for output, so $0.00055 in total. The $0.50 trial credit therefore covers roughly 900 such turns. Failed or refused requests are not charged, and prepaid credit never expires. Top-ups run from $20 to $500 in crypto (USDT on TRC20 or USDC on Base), with a bonus of 5% from $50, 10% from $100 and 15% from $200. Full details sit on the pricing page.

If you go over a limit you get HTTP 429. The error code rate_limited means too many requests per minute, and concurrency means too many at once. A streamed request holds its slot until the stream ends, so close streams you no longer read.

Rules that stay in force

The service is for lawful adult use only. Content involving minors is a hard limit and is never acceptable, whatever the framing. Prompts are not used for training. Keep your age checks, consent screens and local legal duties in your own product, because the API gives you a capable text model and nothing more. The full request reference is in the documentation.

Common questions

Is this the official API of a known model vendor?

No. It is a single open-weight model run by an independent provider. It is not affiliated with Meta, Mistral, Qwen, DeepSeek, OpenAI, xAI, Google or Anthropic.

Can I use my existing OpenAI code?

Yes. Point the SDK at https://api.nsfwia.com/v1, use your key and set the model to uncensored. Chat completions, responses, streaming, tool calling and JSON mode are supported.

Does it generate images?

No. The service is text only, with no image, audio or video generation and no embeddings.

How do I pay?

With prepaid credit, topped up in crypto (USDT on TRC20 or USDC on Base) from $20 to $500. There is no subscription.

Is there a way to test it for free?

New users can claim $0.50 of trial credit on the API key page. It is valid for 7 days, one per person.

Get your key in seconds

Sign up, retrieve your key, update the base URL. That is all you need to do.

Get your key