EN ▾
Get API key

Grok Alternative for Chatbots: SillyTavern and Custom Bots

A grok alternative for chatbots has to hold a persona, stream replies quickly and stay affordable over thousands of short turns. Here is how to wire an OpenAI-compatible, uncensored endpoint into SillyTavern or your own bot.

Updated

Stage with empty masks linked to a chat bubble, representing persona-driven chatbots

Key points

  • SillyTavern and similar front ends accept an OpenAI-compatible endpoint, a key and a model name.
  • Use the model ID uncensored with the base URL https://api.unrestrictedgrok.cc/v1.
  • Keep history short and the persona in the system message to control cost and drift.
  • A chat turn with 6,000 tokens in and 250 out costs about $0.001, so 5,000 turns cost $5.13.

What a chatbot asks of the model

Chatbots are a different workload from coding agents. Turns are short, there are many of them, and users notice tone more than accuracy. The model has to keep a character consistent over a long session, answer fast enough that streaming feels natural, and not break the mood with an unexpected refusal.

The last point is why people go looking for an alternative in the first place. Companion apps, interactive fiction and roleplay for adults often run into a model that stops the story to lecture. This API serves one open-weight model, ID uncensored, tuned to answer without content refusals for lawful adult use. It is an independent provider's model and not the official xAI API.

One boundary applies to every bot on this service: sexual content involving minors is not allowed, and no setting changes that. If you run a public bot, add your own age gate and moderation on top.

Connect SillyTavern

SillyTavern lets you add an OpenAI-compatible endpoint as a chat completion source. The exact menu names change between versions, so look for the connection panel with the plug icon and a source option for a custom or OpenAI-compatible API.

  1. Choose the custom OpenAI-compatible source.
  2. Set the endpoint URL to https://api.unrestrictedgrok.cc/v1.
  3. Paste your API key. You can get one on the key page.
  4. Enter the model name uncensored by hand if the list does not fill in, or press the connect button so it calls GET /v1/models.
  5. Press connect and send a test message.

If the connection fails, check three things. First, the URL must end in /v1 with no trailing path. Second, the key must be pasted without spaces. Third, you should not be sending more than 2 requests at once on a trial key, because the trial limit is 2 concurrent requests and 60 per minute. A full key allows 8 concurrent and 300 per minute.

Sampling settings such as temperature, top-p, stop strings and the penalties are passed through. For roleplay, a temperature around 0.8 to 1.0 usually keeps replies varied, and lower values keep them steady.

A minimal custom chatbot

If you would rather own the whole stack, a chat loop is short. The system message carries the persona. The history list carries the conversation.

from openai import OpenAI

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

persona = (
    "You are Mara, a dry-witted ship navigator in a space adventure for adults. "
    "Stay in character, reply in two to four sentences, never break the fourth wall."
)
history = [{"role": "system", "content": persona}]

while True:
    user = input("you> ")
    history.append({"role": "user", "content": user})
    stream = client.chat.completions.create(
        model="uncensored",
        messages=history,
        temperature=0.9,
        stream=True,
    )
    reply = ""
    for chunk in stream:
        if chunk.choices and chunk.choices[0].delta.content:
            piece = chunk.choices[0].delta.content
            reply += piece
            print(piece, end="", flush=True)
    print()
    history.append({"role": "assistant", "content": reply})

This version streams, which makes a bot feel faster. It also leaves a gap you will want to close: the history grows forever. The next section covers that.

Memory, persona drift and context length

The context window is 100,000 tokens, which is large, but filling it on every turn is wasteful and can make a character drift. Three habits keep a bot sharp.

  • Pin the persona. Keep it in the first system message and resend it every turn. Do not rely on it surviving in old turns.
  • Trim by turns. Keep the last 10 to 20 exchanges verbatim and drop the rest.
  • Summarize older material. Every so often, ask the model for a short summary of the oldest turns, store it as a system note, and delete the originals.
def trim(history, keep=16):
    system = history[:1]
    rest = history[1:]
    return system + rest[-keep:]

Call trim(history) before each request. If you add a summary note, insert it right after the system message. Use a fixed seed while you tune the persona so you can compare two versions on the same input, and set stop sequences if your format uses speaker labels that the model might otherwise invent for the user.

Handling many users at once

One user is easy. A hundred users on one key are not, because a full key allows 8 concurrent requests. A streamed reply holds its slot until the last token arrives, so a long reply blocks a slot longer than a short one. When you exceed the limit the API returns HTTP 429 with the code concurrency, and for requests per minute the code is rate_limited. Temporary overload also returns 429, with Retry-After: 5.

The practical fix is a small queue. Put incoming messages in a queue, run at most 6 or 7 workers so you keep headroom, and retry on 429 after waiting the number of seconds in the header. Show a typing indicator to the user in the meantime. Cancel the upstream request if the user leaves, so the slot is released.

If you outgrow one key's limits, that is a sign to look at how your traffic is shaped before anything else, and the docs describe the limits in full.

What a chatbot costs to run

Chat is cheap per turn but adds up with volume. Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Take a turn where the persona and trimmed history make 6,000 input tokens and the reply is 250 tokens.

  • Input: 6,000 / 1,000,000 x $0.15 = $0.0009
  • Output: 250 / 1,000,000 x $0.50 = $0.000125
  • Per turn: $0.001025

At 5,000 turns that is 5,000 x $0.001025 = $5.125, about $5.13. Cutting history to 3,000 input tokens per turn drops input to $0.00045 and the turn to $0.000575, which makes 5,000 turns cost $2.875. Trimming history is the biggest lever you have.

Billing is prepaid with no subscription. Top-ups run $20 to $500, with +5% from $50, +10% from $100 and +15% from $200, and credit never expires. Payment is crypto only: USDT on TRC20 or USDC on Base. Failed or refused requests are not charged. Watch the X-Balance-USD response header to alert yourself before credit runs out. New users can claim $0.50 of trial credit, valid for 7 days, with one click on the key page. More on the pricing page.

Writing a persona that holds up

Most bot problems trace back to a vague persona. A good one fits in 150 to 300 words and covers who the character is, how they speak, what they know, what the scene is and what the format of a reply looks like. Concrete details help more than adjectives: a navigator who answers with short dry sentences and never explains a joke is easier for the model to hold than a character described as witty and mysterious.

Give two or three sample lines of dialogue inside the system message so the model has a voice to copy. State the reply length, since models drift long over a session, and cap the output with max_tokens if your interface has a hard limit. For group scenes, name each speaker in the prompt and use stop sequences so the model does not write the user's lines.

Test the persona with awkward inputs: one-word messages, off-topic questions, attempts to make the character drop the scene. Fix what breaks by editing the persona, not by piling on rules.

Before you launch a public bot

Decide what your own rules are, because the model will not enforce many of them for you. Add an age confirmation step. Keep a short list of topics your bot refuses in the system prompt. Log request IDs from the X-Request-Id header so you can trace a complaint. Prompts are not used for training, but you still decide how long your own logs live.

Also be clear about what you are not getting. The service is text only, with no voice, images or fine-tuning, and one model with no vendor router. If you need a voice companion, you will pair this with separate speech services.

Questions and answers

Can I use this with SillyTavern?

Yes. Add it as an OpenAI-compatible source with the URL https://api.unrestrictedgrok.cc/v1, your key and the model name uncensored.

Is it the real Grok?

No. It is an independent provider running one open-weight model. It is not an official xAI or Grok API.

How do I keep a persona consistent?

Put the persona in the system message, resend it each turn, trim old history and summarize older turns instead of sending everything.

What does it cost for a busy bot?

With 6,000 input and 250 output tokens per turn, each turn costs about $0.001, so 5,000 turns cost about $5.13.

Your key is one form away

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