EN ▾
Get API key

Mistral API SillyTavern Setup: Uncensored Endpoint

SillyTavern can talk to any OpenAI-compatible endpoint, which means you can use a hosted uncensored model without running anything locally. This guide covers the mistral api sillytavern setup step by step, with settings and a cost estimate.

Chat bubbles on a stage linked by a cable to a server cube, representing SillyTavern connected to an API

Updated

What you need before you start

You need three things: a running SillyTavern install, an API key, and the base URL. This is not the official API of Mistral or of any model maker. It is an independent, OpenAI-compatible service running one open-weight model that is tuned to answer without content refusals for lawful adult use. SillyTavern does not care who runs the endpoint, only that it speaks the OpenAI chat format.

If you do not have a key yet, sign up with Google or with an email and password, then open the API key page. A new account can claim $0.50 of trial credit with one click there. It needs no card, lasts 7 days and is limited to one per person. That is enough for several long chats while you tune settings.

Write down these values:

  • Base URL: https://api.mistralapi.top/v1
  • Model ID: uncensored
  • Auth: your key, sent as a Bearer token (SillyTavern does this for you)

Test the key outside SillyTavern first

A thirty-second curl test separates key problems from SillyTavern problems. If this works, the endpoint and key are fine and any later error is a settings issue.

curl https://api.mistralapi.top/v1/chat/completions   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Reply with the single word ready."}],
    "max_tokens": 10
  }'

You should get a JSON reply with choices[0].message.content. You can also list models with GET /v1/models at the same base URL. A 401 means the key is wrong or has a stray space; a 404 usually means the URL is off.

Connect SillyTavern step by step

Menu names shift a little between SillyTavern versions, so look for the equivalents if a label differs from what is below.

  1. Open the API Connections panel (the plug icon in the top bar).
  2. Set API to Chat Completion. Do not use Text Completion; that mode expects a different request format.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. In Custom Endpoint (Base URL) enter https://api.mistralapi.top/v1. Stop at /v1. Do not add /chat/completions; the client appends the path.
  5. Paste your key into Custom API Key.
  6. In the model field type uncensored. If SillyTavern offers a model dropdown filled from /v1/models, you can pick it there instead.
  7. Click Connect. A green status indicator and the model name mean the link works.

Now open or start a chat with a character card and send a message. If the reply streams in word by word, you are done with the connection part. The rest of this guide is tuning.

Settings that matter for roleplay

The default sampler values in SillyTavern are a reasonable start. A few settings deserve attention because they affect both quality and cost.

Context size and response length

The model has a 100,000-token context window, shared between your prompt and the reply. You do not have to use it all. Setting SillyTavern's context to something like 16,000 to 32,000 tokens keeps character cards, lore entries and recent chat in view while limiting what you pay on every turn. Raise it only if the story loses track of earlier events. Set the response length (max_tokens) to a number you are happy to pay for, for example 300 to 600 tokens; it is optional on this API, but a cap stops a runaway reply.

Temperature and penalties

Temperature, top_p, stop sequences, seed and the frequency and presence penalties are passed through to the model. A temperature near 0.8 to 1.0 suits creative writing; lower values keep a character more consistent. If replies start repeating phrases, nudge the penalties up slightly rather than raising temperature a lot.

Streaming

Keep streaming on. It uses server-sent events and shows text as it is generated. One detail to remember: a streamed request holds its concurrency slot until the stream ends, so a reply that you stop reading still counts until it finishes or is cancelled.

What a chat costs

Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. In a roleplay chat the whole visible history plus the character card is sent as input on every turn, so the input side grows as the story does. The output side is only the reply.

Context sent per turnReplyMathCost per turn100 turns
6,000 tokens3000.0009 + 0.00015$0.00105$0.105
16,000 tokens4000.0024 + 0.0002$0.0026$0.26
30,000 tokens3000.0045 + 0.00015$0.00465$0.465

So a 100-turn session at a modest context costs around ten cents, and even the 30,000-token case fits inside the $0.50 trial. If you chat for hours a day with a large context and lorebook, the input side adds up, which is another reason to keep the context setting honest. Failed or refused requests are not charged. For top-ups and the bonus tiers, see the pricing page.

Troubleshooting

  • 401 Unauthorized. The key is missing or mistyped. Paste it again without spaces, and confirm the same key works in the curl test.
  • 404 or "not found". Check the base URL. It should end in /v1. A doubled path such as /v1/chat/completions/chat/completions is the usual cause.
  • Model not found. The model ID must be exactly uncensored, lowercase.
  • 429 with concurrency. You have too many requests in flight. On a trial key the cap is 2. Close extra tabs, stop group-chat auto replies, or wait for streams to finish.
  • 429 with rate_limited. More than 60 requests in a minute on a trial key (300 on a funded one). Slow down swipes and regenerations.
  • 429 with a Retry-After header. The service is briefly overloaded. Wait the 5 seconds it asks for and try again.
  • Empty or cut-off replies. Raise the response length, and check that the prompt plus reply stays inside the context window.
  • Balance question. The X-Balance-USD header on each response shows what is left, which you can read with a quick curl -i call.

Character cards, lorebooks and the token bill

Everything SillyTavern puts in the prompt is input you pay for on each turn: the character description, the example dialogue, the author's note, active lorebook entries and the visible chat. A detailed character card of 1,500 tokens costs 1,500 / 1M x $0.15 = $0.000225 per turn, or $0.0225 over 100 turns. That is small, but a big lorebook that injects several thousand tokens on every message is not, so keep entries short and trigger them by keyword instead of leaving them always on.

Swipes and regenerations are the other habit that adds up. Each one is a fresh request with its own output. At 6,000 tokens in and 300 out, a swipe costs $0.00105, so ten swipes cost $0.0105. Still cheap, but they also count toward the 60 requests per minute of a trial key, and rapid regenerations are the usual cause of a surprise 429.

If you use group chats, remember that each character's reply is a separate request. Turn off automatic replies while you test so that two or three characters do not talk at the same time and fill both of your trial concurrency slots.

Keeping your key private

SillyTavern stores connection details on the machine where it runs. If you share a settings export, a screenshot of the connection panel or a bug report, remove the key first. If a key leaks, replace it from your account and update the connection panel. When you run SillyTavern on a server that other people can reach, put a login in front of it, because anyone using your instance spends your credit. Prompts sent to this API are not used for training.

Using the API from your own scripts too

Once SillyTavern works, the same key works in any OpenAI SDK, which is useful if you write helper scripts, character generators or batch tools. The quickstart shows the three-line switch for common clients. A minimal Python call looks like this:

from openai import OpenAI

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

reply = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You write a grumpy innkeeper in an original fantasy setting."},
        {"role": "user", "content": "Greet a traveler arriving at midnight."},
    ],
    temperature=0.9,
    max_tokens=250,
)
print(reply.choices[0].message.content)

One rule applies to every use: the service does not produce sexual content involving minors, and characters must be adults. Fiction, roleplay and companion apps for lawful adult use are the intended audience. Prompts are not used for training.

Questions and answers

What do I enter as the model name in SillyTavern?

Type uncensored, all lowercase. You can also pick it from the dropdown if SillyTavern fetches the model list from the endpoint.

Should I choose Chat Completion or Text Completion?

Chat Completion with the Custom (OpenAI-compatible) source. The API exposes POST /v1/chat/completions and GET /v1/models.

Why does my base URL give a 404?

Most often the path is doubled. Enter https://api.mistralapi.top/v1 and nothing after it; SillyTavern adds the rest.

How much does a long roleplay session cost?

At $0.15 per 1M input and $0.50 per 1M output tokens, 100 turns with a 6,000-token context and 300-token replies cost about ten cents.

Can I try it without paying?

Yes. New users can claim $0.50 of trial credit with one click on the API key page. It needs no card and is valid for 7 days.

Your key is one form away

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

Get API key