Wild West API

Use an uncensored API in NextChat (ChatGPT-Next-Web)

NextChat, formerly ChatGPT-Next-Web, is an open-source chat UI with a web version, desktop apps and a one-click self-host. Its desktop app and a self-hosted server can reach the Wild West API; the public web page with a custom endpoint cannot yet.

Works from the desktop or a self-hosted copy. The hosted web version calls the API from your browser tab, which the API does not allow yet.

Set it up

  1. 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.
  2. Desktop app: open Settings and turn on Custom Endpoint.
  3. Set Model Provider to OpenAI.
  4. Set OpenAI Endpoint to https://wildwestapi.com with no /v1 (NextChat adds v1/chat/completions itself).
  5. Paste your sk-ww- key into OpenAI API Key.
  6. In Custom Models, enter outlaw-1, then choose it as the model.
  7. Self-hosted: set BASE_URL, OPENAI_API_KEY and CUSTOM_MODELS on the server instead (see below) and leave the endpoint on /api/openai.

Does it work with the Wild West API?

In NextChat's source, when Custom Endpoint is on and the endpoint starts with http, the browser calls that URL directly. On the hosted web version that means a cross-site request with an API key, which needs a CORS preflight the Wild West API does not answer today. So the hosted page fails with a network error.

  • Desktop app: works. It is a Tauri app and sends requests through its native layer.
  • Self-hosted with server variables: works. With the endpoint left on the default /api/openai, the browser talks to your own NextChat server and that server calls the API.
  • Any web page with Custom Endpoint pointing at wildwestapi.com: does not work yet.

Self-hosting with environment variables

BASE_URL=https://wildwestapi.com
OPENAI_API_KEY=sk-ww-your-key
CUSTOM_MODELS=-all,+outlaw-1,+glm-5.3-outlaw
CODE=pick-a-password

BASE_URL overrides where the server sends OpenAI requests. CUSTOM_MODELS uses + to add and - to hide models, and -all hides the OpenAI defaults. Set CODE so strangers cannot use your key.

The settings that matter for long roleplay

  • Max Tokens in the model settings caps reply length; see max tokens.
  • Attached messages count and history compression decide how much of the story is resent. These models accept 512K tokens or more of context window, so you can send more history, at a higher input cost.
  • Put your character into a mask's system prompt; see system prompt.

Troubleshooting NextChat

  • 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: you are on a web page with Custom Endpoint set to wildwestapi.com. Use the desktop app, or self-host and set BASE_URL on the server.
  • 404: the endpoint ends in /v1. NextChat appends v1/chat/completions, so use https://wildwestapi.com.

FAQ

Why should the endpoint not include /v1 here?

NextChat adds v1/chat/completions to whatever you enter, so including /v1 produces /v1/v1 and a 404.

Does a Vercel deployment of NextChat work?

Yes if you set BASE_URL and OPENAI_API_KEY as environment variables and leave the in-app endpoint on /api/openai, so your deployment makes the call.

How do I hide the OpenAI model names?

Set CUSTOM_MODELS to -all followed by +outlaw-1 and any other ids you want.

Related

Uncensored AI models on one key

OpenAI and Anthropic compatible, pay as you go. New to it? Start with uncensored AI, explained.