Use LiteLLM with an uncensored LLM API
LiteLLM routes by model prefix. For an OpenAI-compatible server like Wild West the prefix is openai/, and the server address goes in api_base.
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.
- Install with pip install litellm.
- Export WILDWEST_API_KEY.
- Call litellm.completion with model openai/outlaw-1, api_base https://wildwestapi.com/v1 and api_key from the environment.
- For a shared gateway, add the same values to a proxy config.yaml and start it with litellm --config.
SDK call
The docs say to prefix the model name with openai/ for the chat completions route so LiteLLM sends it to an OpenAI-compatible endpoint. Without the prefix it tries to guess the provider from the name and outlaw-1 matches none.
import os, litellm
resp = litellm.completion(
model="openai/outlaw-1",
api_base="https://wildwestapi.com/v1",
api_key=os.environ["WILDWEST_API_KEY"],
messages=[{"role": "user", "content": "Write the opening of a noir story."}],
)
print(resp.choices[0].message.content)Keep /v1 on api_base. The docs advise checking that it ends in /v1 if you see Not Found errors.
Proxy config.yaml
The proxy lets many apps share one entry point. Each model_list item has a public model_name that your apps use and litellm_params that say where it goes. The os.environ/ form reads the key from the environment so it stays out of the file.
model_list:
- model_name: outlaw
litellm_params:
model: openai/outlaw-1
api_base: https://wildwestapi.com/v1
api_key: os.environ/WILDWEST_API_KEYStart it with litellm --config config.yaml. It listens on port 4000 by default, and any OpenAI client can then use http://localhost:4000 with the model name outlaw.
Tool calling and streaming
Both pass through as normal OpenAI-format parameters, so stream=True and tools=[...] work the way they do against any other provider, subject to the model supporting tools.
One limit to know
The proxy is a second hop that you host. Your prompts pass through it, and anyone who can reach port 4000 without a LiteLLM key can spend your Wild West balance. Do not expose it publicly without setting up proxy keys.
FAQ
Why does LiteLLM say it cannot find the provider?
The model string needs the openai/ prefix. Use openai/outlaw-1, not outlaw-1.
Does LiteLLM know the price of these models?
Do not count on it. The prices are set on the Wild West pricing page and the dashboard shows your real spend, so treat that as the source of truth.