EN ▾

Uncensored API for your scripts

Get API key

https://api.nsfwgemini.cc/v1

SillyTavern Gemini Base URL: Custom Endpoint Setup

If you searched for a SillyTavern Gemini base URL, here is the short version: this service is not Google's Gemini, but it plugs into SillyTavern as a Custom OpenAI-compatible endpoint with one URL, one key and one model name.

Updated

Abstract panel connected by a cable to a server cube, representing a chat client pointed at a custom API endpoint

The base URL and the fields to fill in

The question behind a search for sillytavern gemini base url is usually "what do I paste into the connection panel so my characters stop getting refused". For this service the answer is a short list. SillyTavern already knows how to talk to any server that copies the OpenAI chat format, and this API does exactly that.

One clarification first. The model behind this endpoint is a single open-weight model run by an independent provider. It is not Google's Gemini and it is not a router to Gemini. If you want Google's own models in SillyTavern, SillyTavern has separate sources for them, with Google's own key and URL. What follows is for people who want a different, less restrictive backend in the same app.

SillyTavern fieldValue
API typeChat Completion
Chat Completion SourceCustom (OpenAI-compatible)
Custom Endpoint (Base URL)https://api.nsfwgemini.cc/v1
Custom API Keyyour key from the API key page
Model IDuncensored

The URL ends at /v1. SillyTavern adds /chat/completions itself, so do not paste the full path. That one mistake causes most failed first connections.

Before you open SillyTavern

You need a key. Sign up with Google or with an email and password, then open the API key page. New accounts can claim $0.50 of trial credit with one click. It lasts 7 days, needs no payment details, and is limited to one per person. After that, credit is prepaid and starts at $20 (see pricing).

It saves time to test the key outside the app. A single request tells you whether the problem is the key or the SillyTavern settings:

curl https://api.nsfwgemini.cc/v1/models   -H "Authorization: Bearer YOUR_KEY"

You should get a JSON list that includes uncensored. If this works and SillyTavern does not, the fault is in the app settings. If it fails with a 401, the key is wrong or has a stray space at the end. The quickstart has the same check plus a chat completion example.

Step by step in SillyTavern

Menu names shift a little between SillyTavern versions, but the order below has been stable for a long time.

  1. Open the plug icon at the top (API Connections).
  2. Under API, choose Chat Completion. Text Completion is a different mode and will not use the right request format.
  3. Under Chat Completion Source, choose Custom (OpenAI-compatible).
  4. In Custom Endpoint (Base URL), enter https://api.nsfwgemini.cc/v1.
  5. In Custom API Key, paste your key. Paste only the key itself, without the word Bearer. SillyTavern adds the header.
  6. In Model ID, type uncensored. If the app offers a dropdown filled from the server, pick it from there.
  7. Press Connect. A green status and the model name mean the call to the server worked.

SillyTavern stores the key on the machine running it. If you host SillyTavern for other people, remember that anyone with access to your server settings can read it. Use a key you can rotate.

Settings worth changing after you connect

Connecting is the easy half. The defaults in the Chat Completion preset panel are tuned for other models, and a few of them matter here.

Context size

The window is 100,000 tokens, counting the prompt and the reply together. SillyTavern has a Context Size slider. You do not have to fill it. A long window means a long history is sent every turn, and you pay for every input token on every request. Many people run 16,000 to 32,000 and rely on summaries or lorebook entries for older events. Raise it when a scene truly needs the earlier text.

Max response length

The API does not require max_tokens, and the reply may use whatever is left of the window. In SillyTavern, set a response length yourself, such as 300 to 600 tokens. Otherwise a long, drifting reply costs more than it adds.

Streaming

Turn on Streaming. The server supports server-sent events, so text appears as it is produced and you can stop a reply that heads the wrong way. A streamed request holds one of your concurrency slots until the last chunk arrives, which matters for the next section.

Sampling

Temperature, top_p, stop sequences, seed and the frequency and presence penalties are passed through to the model. Start with temperature around 0.8 to 1.0 and leave top_p at 1 while you adjust one knob at a time. A fixed seed helps when you want to compare two prompt edits on the same scene.

Group chats and the concurrency limit

A full key allows 8 requests at once and 300 per minute. A trial key allows 2 at once and 60 per minute. In a one-on-one chat you will never notice either number, because you send one message and wait for one reply.

Group chats are different. When several characters answer in turn, or when you use swipes and regenerations quickly, SillyTavern can have more than one request in flight. Add the streaming rule (a slot stays busy until the stream ends) and a trial key can hit its 2-request ceiling faster than you expect. The API then answers with HTTP 429 and the error code concurrency. The fix is to wait for the current reply to finish, or to use a full key once you have topped up.

Per-minute limits return the code rate_limited. During a short overload the server can also send a 429 with a Retry-After: 5 header. In both cases SillyTavern shows an error toast. Waiting five seconds and pressing regenerate is normally enough.

What each error means

You seeLikely causeFix
401 or "invalid key"Typo, trailing space, key from another siteCopy the key again from the API key page, paste without spaces
404 not foundFull path pasted, or a missing /v1Use exactly https://api.nsfwgemini.cc/v1
Model not foundWrong model nameType uncensored, lowercase, no extra text
429 concurrencyToo many requests at onceWait for streams to finish, avoid rapid regenerate clicks
429 rate_limitedOver requests per minutePause for a moment, then retry
Connection refused or timeoutLocal network, proxy or typo in hostRun the curl test from the same machine

Failed or refused requests are not charged, so a string of errors will not drain your balance. If a problem does not fit this table, open the support page and include the X-Request-Id header from a failing response, since that identifies the exact call.

What a roleplay session costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Roleplay is input-heavy because the character definition and chat history are resent each turn.

Take a session of 100 turns where each request carries about 6,000 tokens of prompt and the reply is about 300 tokens:

  • Input: 100 x 6,000 = 600,000 tokens, which is 0.6 x $0.15 = $0.09.
  • Output: 100 x 300 = 30,000 tokens, which is 0.03 x $0.50 = $0.015.
  • Total: $0.105 for the whole session.

The $0.50 trial credit covers a little under five sessions of that size. A $20 top-up covers roughly 190 of them. Bonuses apply on larger top-ups: +5% from $50, +10% from $100 and +15% from $200. Credit does not expire, so you can top up once and use it slowly. If you are comparing this against another per-token provider you already use, the Kimi cost comparison shows how to run the same arithmetic on two price lists.

Prompts are not used for training. The rule that applies to everything sent through the API is that it is for lawful adult use only, and sexual content involving minors is not allowed under any framing.

Questions and answers

What is the SillyTavern base URL for this API?

Use https://api.nsfwgemini.cc/v1 with the Custom (OpenAI-compatible) source under Chat Completion. Do not add /chat/completions, because SillyTavern appends it.

Is this the same as Google's Gemini API?

No. It is an independent OpenAI-compatible service running one open-weight model. For Google's own models, use SillyTavern's separate Google source with Google's key.

Which model name do I enter?

Enter uncensored. It is the only model ID, and it is returned by GET /v1/models.

Why do I get a 429 in a group chat?

A streamed reply keeps its concurrency slot until it finishes, and a trial key allows only 2 at once. Wait for the reply to end or move to a full key, which allows 8.

Your key is one form away

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

Get API key