EN ▾
Get API key

How to write text with uncensored AI and use the API

A guide to using this OpenAI-compatible API for uncensored text generation, from your first call to tips for long-form writing.

Updated

Key points

  • OpenAI-compatible: existing code works by changing the base URL and key
  • Model ID is uncensored, context window up to 100,000 tokens
  • Structure long texts by chapter first to prevent coherence loss
  • Usage is lawful for adults; sexual content involving minors is prohibited
Image of glowing handwriting flowing into a terminal, representing the text generation API

First API call

Many users searching for "uncensored AI text" likely want to generate novels, scripts, character settings, and blog drafts without being rejected. Our API provides an open-weight language model tuned to reduce rejection responses, in an OpenAI-compatible format. All you need are the API key, base URL, and model ID — 3 things.

The base URL is https://api.mukenetsuapi.com/v1, the model ID is uncensored, and authentication uses Authorization: Bearer key. You can generate your key on the API key page. Let's verify with curl first.

curl https://api.mukenetsuapi.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "user", "content": "雨の夜の駅を舞台にした、400字程度の短い導入部を書いてください。"}
    ]
  }'

If using the Python openai library, specify base_url when creating the client.

from openai import OpenAI

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

res = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "あなたは日本語の小説編集者です。指示された文体で書いてください。"},
        {"role": "user", "content": "雨の夜の駅を舞台にした、400字程度の短い導入部を書いてください。"},
    ],
    temperature=0.8,
)
print(res.choices[0].message.content)

The returned JSON structure is identical to OpenAI's, so the body goes into choices[0].message.content. The official Node.js SDK works similarly if you swap the base URL.

Rules to know before using

The model for this API is tuned to avoid content-based refusals, assuming legal adult use. However, not everything is permitted.

  • Sexual content involving minors cannot be generated under any settings.
  • Usage is limited to legal purposes. See the Terms for details.
  • Only text is supported. Image, audio, and video generation are not available.
  • Sent text is not used for model training.

Fictional violence, heavy psychological themes, and morally ambiguous character monologues are often rejected by standard commercial models. For creators, fewer refusals make a significant practical difference. However, you are responsible for the output. Always read it yourself before publishing and ensure it fits your platform's guidelines.

Tips for writing long texts

The context window is 100,000 tokens for prompt and output combined. It fits quite long manuscripts, but generating everything at once may cause settings to shift or expressions to repeat in the second half. The next steps are stable.

Create a chapter outline first

Generate only an outline or bullet-point summary first, then have a human review it before proceeding to the body text. Deciding on character names, narrative perspective, and tone (polite vs. plain) here reduces later edits.

Write one chapter at a time, providing the outline each time

The following code shows an example of generating 5 chapters sequentially after creating an outline. Since each request includes the outline and previously generated text, the model can continue writing based on the previous content.

from openai import OpenAI

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

def ask(prompt, system="あなたは日本語の小説家です。"):
    res = client.chat.completions.create(
        model="uncensored",
        messages=[
            {"role": "system", "content": system},
            {"role": "user", "content": prompt},
        ],
        temperature=0.8,
    )
    return res.choices[0].message.content

# 1. 先に章立てを作る
outline = ask("港町を舞台にした短編の章立てを、5章、各章1行で作ってください。")

# 2. 章立てを毎回渡して、1章ずつ書く
chapters = []
for i in range(1, 6):
    text = ask(
        f"章立て:\n{outline}\n\nこれまでの本文:\n{''.join(chapters)}\n\n"
        f"第{i}章を800字前後で書いてください。章立てから外れないこと。"
    )
    chapters.append(text + "\n\n")

print("".join(chapters))

System prompt and temperature tips

In the system prompt, briefly write the narrator's perspective, style, and phrases to avoid. Try temperature around 0.7 to 1.0 for stories, or 0.2 to 0.5 for summaries and editing, then adjust based on results. Setting seed makes it easier to compare under the same conditions. If the same opening continues, you can also use frequency_penalty or presence_penalty. You can also specify a string to stop output with stop.

View progress with streaming

Long texts require waiting for completion. Adding stream: true lets you receive data via SSE and display it as it writes. Token usage is also provided at the end.

from openai import OpenAI

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

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "夏祭りの帰り道を描く短い散文を書いてください。"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Streaming requests occupy one concurrency slot until completion. Keep this in mind when generating multiple chapters in parallel.

Estimated cost for text generation

The pay as you go pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. For example, if you send an input of 1,000 tokens and get an output of 3,000 tokens for one article, the calculation is as follows.

  • Input: 1,000 ÷ 1,000,000 × $0.15 = $0.00015
  • Output: 3,000 ÷ 1,000,000 × $0.50 = $0.0015
  • Total: $0.00165

At about $0.00165 per request, 100 requests cost only $0.165. Passing the full text from previous chapters each time increases input, but since the input rate is less than one-third of the output rate, the impact is smaller. Failed requests and rejected requests are not charged. For detailed pricing and charging methods, see the pricing page.

Troubleshooting

SymptomCheck
401 ErrorKey pasting error. Check if the header is in the form Bearer key.
404 ErrorEnsure the base URL includes /v1. Check if the path is duplicated.
429 ErrorIf the error code is rate_limited, it means you exceeded the requests per minute limit; if it is concurrency, it means you exceeded the number of parallel requests. If Retry-After: 5 is included, it indicates temporary congestion, so wait 5 seconds and retry.
Inconsistent writing styleSpecify the writing style in the system prompt and pass the chapter structure and previous text each time.

The full key limit is 8 concurrent requests and 300 requests per minute. The trial key limit is 2 concurrent requests and 60 requests per minute. You can check the balance via GET /v1/balance or the response header X-Balance-USD. For other parameters and endpoints, refer to the documentation.

Other Guides

Frequently Asked Questions

Can I try it for free?

After registering, you can receive $0.50 in trial credit with one click on the API key page. One per person, valid for 7 days, no payment method required.

How do I pay?

Top up in integer amounts from $20 to $500, paying with USDT (TRC20) or USDC (Base). Bonuses of +5% for $50+, +10% for $100+, and +15% for $200+ are applied.

Can I generate images?

No. This API is text-only and does not support image, audio, or video generation, embeddings, or fine-tuning.

Is my input text used for training?

No. Prompts are not used for model training.

Is this the official OpenAI API?

No. It is a single open-weight model operated by an independent provider, not the official OpenAI or other companies' API, and not a router that switches between multiple providers.

API key is obtainable with a single form

Create an account, copy the key, and change the base URL. That's all you need to set everything up.

Get API Key