EN ▾

SillyTavern Web Search Extension With an Uncensored API

The SillyTavern web search extension pulls fresh results into your chat context, and a custom OpenAI-compatible endpoint writes the reply. Here is how to wire both and fix what usually breaks.

What each piece does

The sillytavern web search extension has one job: before the model answers, it runs a search, takes the results and inserts them into the prompt as extra context. The model does not browse. It simply sees a block of text that says what the search returned, and writes its reply with that block in view. That means two separate systems cooperate. SillyTavern and its extension handle search and prompt assembly. The API handles text generation.

This split is useful because you can change either side freely. You can keep your search settings and swap the model, or keep the model and swap the search provider. The rest of this article connects them in order: first the model endpoint, then the extension, then the prompt behavior, then troubleshooting. Menu names in SillyTavern change between releases, so treat the labels below as guides and check your version if something is named differently.

Step 1: connect the API as a custom endpoint

Open the API connection panel in SillyTavern and choose Chat Completion as the API type. In the source dropdown pick the custom, OpenAI-compatible option. Then fill in three values.

  1. Endpoint URL: https://api.uncensoredsearch.top/v1
  2. API key: the key from your account, sent as a Bearer token.
  3. Model ID: uncensored

Press Connect. A successful test means the app could reach the endpoint and read the model list. If you want to confirm outside SillyTavern first, this request should return a JSON list that includes the model:

curl https://api.uncensoredsearch.top/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

And a one-line chat test:

curl https://api.uncensoredsearch.top/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in five words."}],"stream":true}'

You can get a key from the API key page. Sign-up works with Google or with email and password, and new users can claim $0.50 of trial credit there with one click. The trial needs no payment details, lasts 7 days and is limited to one per person.

Step 2: set up the search extension

Install the web search extension from SillyTavern's extensions panel if your version does not already list it, then open its settings drawer. Exact options vary by version, but the same decisions come up each time.

Choose a search source

The extension supports several providers, and some need their own key while others point at a self-hosted instance. A self-hosted SearXNG address is a popular pick for people who want control over where queries go. Whichever you choose, the search cost is separate from this API and has its own terms, so check the provider's current pricing and limits.

Decide how many results to inject

Start small. Three to five results with short snippets is plenty for most chats. Every injected token is resent on each turn and billed as input, so a large block adds up over a long session.

Set when it triggers

Many setups run a search only when a message contains a trigger word or a question mark, or when you invoke it with a command. Automatic search on every message is convenient, but it slows replies and fills the context with repeated results.

Check the injection position

Results should sit in the prompt where the model treats them as reference, not as part of the story. If the model starts quoting search text as dialogue, move the block or add a note in the instructions that the block is background information.

Step 3: keep the context under control

The context window is 100,000 tokens, shared between the prompt and the reply. SillyTavern builds a prompt from the character description, the persona, world info, chat history and now the search block. Long roleplay sessions grow fast.

A rough budget helps. Say the character profile and world info take 3,000 tokens, search results add 800, and chat history holds 6,000. That is 9,800 input tokens per turn. With a 400-token reply the turn costs 9,800 x $0.15 / 1,000,000 = $0.00147 for input plus 400 x $0.50 / 1,000,000 = $0.0002 for output, so $0.00167. A hundred such turns come to $0.167, less than 17 cents. Doubling the history to 12,000 tokens lifts a turn to 15,800 input tokens, which is $0.00237 plus $0.0002, or $0.00257.

Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit with no subscription. Credit never expires and failed or refused requests are not charged. See the pricing page for the top-up tiers, which run from $20 to $500. Payment on this site is by crypto (USDT on TRC20, USDC on Base).

Prompting so the model uses the results well

Models tend to either ignore injected search text or lean on it too hard. A short instruction fixes most cases. Something like this in the system prompt or the extension's template works:

Background information from a web search is provided below. Use it for factual details when it is relevant. Do not mention the search, and do not quote it word for word. Stay in the voice and style of the scene.

For fiction and roleplay for adults, this is where the endpoint helps. The model is tuned to answer without content refusals for lawful adult use, so a scene is not interrupted when the story goes to mature themes, and the search block can supply real-world details such as places, history or terminology. The one fixed rule is that no sexual content involving minors is allowed, in any framing.

Sampling settings pass through. Temperature, top_p, stop, seed and the penalties all reach the model, so the usual SillyTavern presets apply. For factual lookups lower the temperature a little; for creative scenes keep your normal values.

Troubleshooting

SymptomLikely causeFix
Connect failsWrong URL or missing /v1Use https://api.uncensoredsearch.top/v1 exactly
Authorization errorKey missing or mistypedPaste the key again, no spaces
429 with rate_limitedToo many requests per minuteSlow down; a trial key allows 60 per minute, a full key 300
429 with concurrencyToo many parallel requestsTrial key allows 2 at once, full key 8; a stream holds its slot until it ends
429 with Retry-After: 5Temporary overloadWait 5 seconds and retry
Model quotes search textInjection position or wordingAdd a background-information instruction
Replies cut or slowOversized contextFewer results, shorter history

If you run several chats or a swipe-regenerate burst, parallel requests can hit the concurrency limit. Send them one after another instead. The response headers X-Request-Id and X-Balance-USD are handy when you ask for help or want to watch your balance, and the support page says how to reach us.

Keeping search results from derailing a scene

A common complaint is that factual search text pulls the story out of character. Two habits reduce it. Trigger the search yourself with a command when you want facts, and leave it off during pure scene writing. And keep the result block short: one or two sentences per hit is enough for the model to pick up a detail. If a reply still reads like an encyclopedia entry, lower the number of results by one and regenerate, which usually restores the voice.

Is it worth it?

Adding search to roleplay or a companion chat pays off when the story touches real places, events or terms and you want accuracy without leaving the scene. It is overkill for pure invention, where fresh facts do not matter. Run the search on demand and keep results brief. For more request examples, including tool calling and JSON mode, read the quickstart. Prompts are not used for training.

Frequently Asked Questions

What is the difference between uncensored and standard APIs?
Uncensored APIs remove brand-specific safety filters, allowing the model to accept a wider range of topics, including adult content, without refusal. Standard APIs enforce stricter content guidelines.

Do I need to change my code to use an uncensored API?
No, if the API is OpenAI-compatible, you only need to update the base URL and API key in your existing client code. The endpoints and request format remain the same.

How is billing handled?
We use a prepaid model where you pay per token consumed. Credits do not expire, and errors are free. You can top up by crypto (USDT on TRC20, USDC on Base).

Is there a trial available?
Yes, new accounts receive $0.50 of trial credit valid for 7 days, with no credit card required. Claim this credit with one click on your API key page.

Questions and answers

Does SillyTavern work with a custom OpenAI-compatible API?

Yes. Choose Chat Completion, pick the custom OpenAI-compatible source, then enter the endpoint URL, your key and the model ID from the setup steps above.

Does the API itself search the web?

No. The search extension fetches results and injects them into the prompt. The API only generates text.

Why do I get a 429 error?

You hit a limit. The code rate_limited means too many requests per minute, concurrency means too many at once, and a Retry-After: 5 header means a short overload. Wait and retry.

Can I use it for adult roleplay?

Yes, for lawful adult fiction and roleplay. Sexual content involving minors is never allowed.

Your key is one form away

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

Get API key

Stage with masks receiving glowing data cubes from a magnifier, showing search results feeding a roleplay chat