RendGet started

Blog

Uncensored roleplay API: build a character chat app | Rend

Detail of the Rend API page showing the API endpoint and available models.

An uncensored roleplay API is a chat endpoint that lets a model play a fictional character through adult themes without breaking scene, and it still refuses content that is illegal or harmful. Rend's API handles this through an OpenAI-compatible /chat/completions endpoint: you send a character sheet as the system message and add "uncensored": true, and the model can read up to 1M tokens of story per request.

The Rend API is in early access. The rend-1 API page has the current details, and the rest of this article covers the parts that decide whether your character holds up: the request, the character sheet, memory, the 18+ check and the loop your app runs on every turn.

What does a character chat app need from an API?

A character chat app needs four things from the model behind it:

  • A system message the model follows for the whole conversation, so the character keeps its name, voice and history.
  • A context window large enough to hold the story so far.
  • A setting that allows adult fiction for confirmed adults.
  • Errors you can predict and handle in code.

The Rend API covers each one. It uses the standard chat format for the system message, reads up to 1M tokens of context, turns on adult fiction with one flag, and returns a documented 403 or 503 when something needs your attention.

Most roleplay guides stop at ranking models. In our view, the model choice matters less than the plumbing in your app: what you resend each turn, where the character sheet lives, and what happens when a request fails. That plumbing is what the next sections build.

How do you call the Rend API?

The Rend API lives at https://api.rend.ai/v1 and speaks the OpenAI chat-completions format, so any client built for that format works once you change the base URL and the key. Create a key in Rend under Settings, Connections, Rend API. Keys start with rnd_api_ and go in a Bearer header.

Three models are available: rend-1, rend-1-regular and rend-pro. Call GET /models to see what your key can use:

curl https://api.rend.ai/v1/models \
  -H "Authorization: Bearer $REND_API_KEY"

Prices are live on Rend's facts page. Check them there before you estimate what a busy app will cost, because we keep those numbers in one place and they can change.

Send a roleplay message with curl

curl https://api.rend.ai/v1/chat/completions \
  -H "Authorization: Bearer $REND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "rend-1",
    "uncensored": true,
    "max_tokens": 400,
    "messages": [
      {"role": "system", "content": "You are Mara, a 34-year-old ferry pilot..."},
      {"role": "user", "content": "*steps onto the ferry* How far to the old docks?"}
    ]
  }'

Python with the OpenAI SDK

Point the OpenAI Python library at Rend's base URL. The uncensored flag is outside the standard format, so it goes in extra_body. This version also retries a busy 503 and stops on a 403:

import os, time
from openai import OpenAI, APIStatusError

client = OpenAI(base_url="https://api.rend.ai/v1",
                api_key=os.environ["REND_API_KEY"])

def reply(sheet, history, user_msg):
    messages = [{"role": "system", "content": sheet}, *history,
                {"role": "user", "content": user_msg}]
    for attempt in range(4):
        try:
            r = client.chat.completions.create(
                model="rend-1",
                messages=messages,
                max_tokens=400,
                extra_body={"uncensored": True},
            )
            return r.choices[0].message.content
        except APIStatusError as e:
            if e.status_code == 503:
                time.sleep(2 ** attempt)
                continue
            if e.status_code == 403:
                raise RuntimeError("Confirm 18+ once in rend.ai/chat") from e
            raise
    raise RuntimeError("Rend API is busy, try again shortly")

JavaScript with fetch

const res = await fetch("https://api.rend.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.REND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "rend-1",
    uncensored: true,
    max_tokens: 400,
    messages: [
      { role: "system", content: characterSheet },
      { role: "user", content: "*sits at the back of the ferry* Who's chasing you?" },
    ],
  }),
});

if (res.status === 403) throw new Error("Confirm 18+ once in rend.ai/chat");
const data = await res.json();
console.log(data.choices[0].message.content);

How do you write a system prompt that keeps a character in role?

A character stays in role when the system prompt is specific. Give the model a name, an adult age, a way of speaking, something the character wants and something they hide, plus rules for what each reply looks like. A sheet that says "a mysterious rogue" gets you a generic rogue by the tenth message.

Here is the template we use as a starting point. Copy it, then replace every line with your own character:

CHARACTER
Name: Mara Okonkwo
Age: 34 (adult)
Who she is: Night-shift ferry pilot on a flooded city's canals. Owes money to the wrong people.
Wants: Enough cash to buy back her late father's boat.
Hides: Two years ago she sold out a friend to the harbour police.

VOICE
Short sentences. Dry humour. Calls everyone by their surname.
Shows feelings through what she does, rarely says them out loud.

SCENE RULES
Stay in character in every reply. Never mention being an AI.
Put actions in *asterisks*. Keep replies under 120 words unless the user asks for more.
Never write the user's dialogue, thoughts or actions.

STORY SO FAR
Mara agreed to take the user across the canal tonight. They have not discussed payment.

LIMITS
Every character is an adult. No real people.

Each block does a job. "Wants" and "Hides" give the character a reason to act when the user goes quiet. The reply length rule stops a chat from turning into pages of prose. The rule against writing the user's lines fixes the habit that ruins most scenes fastest: the model deciding what your player said or felt.

Keep "STORY SO FAR" short and let your app rewrite it. That block is where long-term memory lives, which the next section covers.

How much of the story can the model remember?

Rend's models read up to 1M tokens of context per request, which fits a long story plus the character sheet. Replies can run to 131,072 tokens on rend-1 and 128,000 on rend-pro. A chat app wants far less, so set max_tokens to the reply length you want.

In the chat-completions format, the model sees only what you send in that request. Your app is the memory. That gives you three stages to plan for:

  1. Early in a chat. Send the character sheet and every message. With a 1M-token window, many chats never leave this stage.
  2. Long chats. Once history passes a size you choose, have the model summarise the oldest turns into the "STORY SO FAR" block, then drop those turns and keep the recent ones word for word.
  3. Facts that must not drift. Keep a short list of names, injuries, promises and items in the sheet itself, and update it when they change.

How soon you move to stage two depends on cost as much as on the limit. A bigger history means a bigger request every turn, so check current API prices before you decide to resend everything forever.

How does uncensored mode work, and what stays off limits?

Uncensored mode is one field. Add "uncensored": true to the request body and the model can follow the story into mature themes. Before the flag works, the account that owns the key has to confirm it is 18+ once in Rend chat at rend.ai/chat. Until then, uncensored requests return 403 with adult_confirm.

Some content stays blocked with the flag on:

  • Anything sexual involves adults only.
  • No content that sexualises minors.
  • No real people without their consent.
  • No harassment or copyright infringement.

Put the same limits in your character sheet, as the template above does, so the model and your app agree. The 18+ confirmation covers your Rend account. The people using your app are a separate question, so build your own age check for them, and get advice on the rules where you operate.

Handle the 403 as a setup error. Retrying it changes nothing, so log it and tell the account owner to confirm in Rend chat.

What does one turn of the app look like?

One turn of a character chat app on Rend follows the same steps every time. Here is the loop for a single message in the Mara story:

  1. Load the character sheet and the "STORY SO FAR" block for this chat.
  2. Add the user's new message. A request can carry up to 10 images, so a user can send a portrait or a map of the scene.
  3. Build the message list: system sheet first, then recent turns, then the new message.
  4. Call /chat/completions with uncensored: true, a max_tokens cap, and any tools. A request accepts up to 128 tools, enough for a dice roller, an inventory and a relationship tracker with room to spare.
  5. On a 503, wait and retry with a growing delay, as the Python sample does.
  6. On a 403 with adult_confirm, stop and alert the account owner.
  7. Save the reply. If history has passed your size limit, run a summary request and rewrite "STORY SO FAR".

Rend has no per-account rate limit. That is useful when traffic spikes, and it also means nothing upstream slows down one user who sends 500 messages a minute. Add your own per-user limit in the app.

Should you use the Rend API, a no-code builder or a local model?

The Rend API suits developers who want their own app and a large context window behind a familiar format. It is the wrong pick if you want a bot live today without writing code.

Chat Data's roleplay chatbot builder is the faster route for that case. Its page says its uncensored model needs a paid plan starting at $19 a month (as of December 2026), and its own roundup says the builder runs characters as Discord, Telegram or website bots.

Running an open-weight model on your own hardware gives you full control and offline use, and costs you GPU time and setup work.

OptionBest forTrade-off
Rend APIDevelopers building their own character appEarly access; you build the interface, memory and user age check
Chat Data builderA hosted bot on Discord, Telegram or a site without codeLess control over the app; uncensored model needs a paid plan
Local open-weight modelFull control, offline use, privacyNeeds your own GPU and setup; context depends on the model

What should you do next?

Create a Rend account, confirm 18+ once at rend.ai/chat, then create a key under Settings, Connections, Rend API. Run the curl request above with your own character sheet and read ten replies before you write any app code. If the voice drifts, fix the sheet first.

Sign up for a free Rend account to get a key. When you are ready to move past testing, compare Rend's plans on the pricing page.

Frequently asked questions

Is the Rend roleplay API free to try?

Signing up for Rend is free, and API prices are listed on rend.ai/facts. Rend offers Free, Starter, Pro and Max plans plus credit top-ups. Compare them on the pricing page before you send real traffic.

Why does the Rend API return a 503 error?

A 503 means Rend is busy at that moment. Rend has no per-account rate limit, so a 503 is about load and says nothing about your account. Wait and retry with a growing delay, as in the Python sample above.

Can my roleplay character be a real celebrity?

No, unless that person has given consent. Rend's hard limits rule out real people without consent, even with uncensored mode on. Write an original character instead.

Can I send pictures to a roleplay character through the API?

Yes, a single request can include up to 10 images. Users can send a character portrait, a scene reference or a map, and the model reads them alongside the text.

Where do I get help with the Rend API?

Email support@rend.ai. The API is in early access, so the rend-1 API page is the place to check for current details first.

Give Rend the job.

Editing is free. You pay only when Rend renders or generates something. What Rend is and who it’s for.