Wild West API

Use an uncensored OpenAI-compatible API in Agnaistic (Agnai)

Agnaistic, also called Agnai, is a character chat app that runs on agnai.chat or self-hosted. Its Third-Party service can talk to any OpenAI-compatible API, and by default the Agnai server sends the request, so the Wild West API works.

Works with Wild West API.

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. In Agnai, open the preset you chat with (Presets in the menu, or the preset settings from inside a chat).
  3. Set AI Service to Third-Party.
  4. Set Third-Party Format to OpenAI Compat (Chat).
  5. Set URL to https://wildwestapi.com/v1. Agnai adds /chat/completions itself.
  6. Paste your sk-ww- key into API Key.
  7. Open the model picker and type outlaw-1 into Manual Model ID, then Confirm.
  8. Leave Use Local Requests switched off, save the preset and send a message.

Does it work with the Wild West API?

Yes, with one setting to watch. By default the Agnai server makes the generation request, so CORS does not apply and both agnai.chat and self-hosted installs work.

The preset has a toggle called Use Local Requests. Agnai's own help text says that when it is on, "your browser will make requests instead of Agnaistic." Turn that on and the request comes from the browser tab, which fails today because the API does not answer CORS preflight. Keep it off.

How Agnai builds the URL

Agnai looks for a version segment like /v1 in your URL and adds it if missing, then appends chat/completions. So https://wildwestapi.com/v1 and https://wildwestapi.com both end up at the right place. If you switch on Disable Auto-URL, nothing is appended and you must enter the full https://wildwestapi.com/v1/chat/completions.

The settings that matter for long roleplay

  • Context Size defaults to 8192 tokens. That is tiny next to the 512K to 1M context window of these models. Raise it to 32K or 64K for long chats, and higher only if you accept the extra input cost per turn.
  • Response Length sets max tokens per reply. 400 to 800 works for most roleplay.
  • Stream Response shows text as it arrives; see streaming.
  • Use OpenAI Compat (Chat), not OpenAI (Completion). The API serves chat completions.

Troubleshooting Agnaistic

  • 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: check that Use Local Requests is off. With it on, your browser calls the API directly and the request is blocked.
  • Empty or cut-off replies: check Response Length and make sure the format is OpenAI Compat (Chat).

FAQ

Does this work on the hosted agnai.chat site?

Yes, as long as Use Local Requests is off. The Agnai server sends the request for you.

Why does Agnai warn about putting an OpenAI key in the third-party field?

Agnai stores the third-party key so its server can make requests. Use a Wild West key made for this purpose and disable it in the dashboard if you stop using Agnai.

Can I chat in multiplayer with this setup?

Yes. Multiplayer needs server-side requests, which is the default mode this guide uses.

Related

Uncensored AI models on one key

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