Add an uncensored model to LibreChat as a custom endpoint
LibreChat is a self-hosted chat app with a Node backend, and it adds third-party providers through custom endpoints in librechat.yaml. Because the server makes the API calls, the Wild West API works with it today.
Set it up
- Sign in at wildwestapi.com/signup/ with the six-digit code sent to your email, open the dashboard and create an API key. It starts with sk-ww- and is shown in full once, so copy it somewhere safe.
- Add WILDWEST_API_KEY=sk-ww-your-key to the .env file next to your LibreChat install.
- Open librechat.yaml and add an entry under endpoints, custom, as shown below.
- Set baseURL to https://wildwestapi.com/v1 and list outlaw-1 (and any other ids you want) under models, default.
- Restart LibreChat so it reads the new config (for Docker, restart the api container).
- Pick Wild West from the endpoint menu, choose outlaw-1 and send a message.
Does it work with the Wild West API?
Yes. LibreChat always calls providers from its own server, so the browser never talks to the API and CORS never comes into it. That holds for local installs and for LibreChat deployed on a VPS.
The librechat.yaml block
The required fields are name, apiKey, baseURL and models. This is a working block:
endpoints:
custom:
- name: 'Wild West'
apiKey: '${WILDWEST_API_KEY}'
baseURL: 'https://wildwestapi.com/v1'
models:
default: ['outlaw-1', 'glm-5.3-outlaw', 'qwen3.8-27b-outlaw']
fetch: true
titleConvo: true
titleModel: 'outlaw-1'
modelDisplayLabel: 'Wild West'With fetch: true LibreChat also reads the live list from /v1/models. If you want each user to paste their own key, set apiKey: 'user_provided'; LibreChat then asks for it in the UI.
The settings that matter for long roleplay
- Max context tokens. LibreChat trims old messages to fit a context budget. For an unknown model it uses a default that is far smaller than the 512K to 1M context window these models have, so long stories lose early details. Raise it in the parameters panel, or set
maxContextTokensin a model spec. - Max output tokens sets reply length; 600 to 1200 suits prose. See max tokens.
- titleConvo makes an extra small request per chat to name it. Point
titleModelatoutlaw-1so it stays cheap. - Streaming is on by default; see streaming.
Troubleshooting LibreChat
- 401: the key is missing, mistyped or disabled. Paste it again with no trailing space and check it starts with
sk-ww-. A key from another provider will never work here. - 402: your balance is too low for the request. Top up in the dashboard; see pricing. A huge context on every turn burns credit faster than you might expect.
- 404 or 400 with an unknown model: the model id is wrong. Use an exact id from the model list, such as
outlaw-1, with no provider prefix and no spaces. - 429: you are rate limited. Wait a few seconds and send again, and turn off any auto-retry loop that fires instantly.
- 5xx: trouble upstream. Retry; if it keeps happening, switch to another model id for a while.
- Network error, "Failed to fetch" or a CORS message: this should not happen with LibreChat, since the server makes the call. Check the api container logs instead; the real error (often a 401 or an unknown model) is printed there.
- The endpoint does not appear: the YAML did not load. Check the indentation, check the file is mounted into the container, and restart.
FAQ
Can I set this up from the LibreChat UI instead of YAML?
Custom endpoints are defined in librechat.yaml. With apiKey set to user_provided, users can then enter their own key from the UI.
Why does my character forget things from early in the chat?
LibreChat prunes history to its context token budget. Raise the max context setting for the model so more of the story is sent.
Does LibreChat support the Anthropic-style endpoint too?
The simplest route is the OpenAI-compatible custom endpoint at https://wildwestapi.com/v1, which covers chat and model listing.