Wild West API

Codex CLI with uncensored DeepSeek V4.1 Flash

Codex CLI speaks only the OpenAI Responses API. Wild West API serves that format at /v1/responses, so Codex can drive DeepSeek V4.1 Flash Outlaw with a provider entry and no shim.

The provider block

Add this to ~/.codex/config.toml:

model = "deepseek-v4.1-flash-outlaw"
model_provider = "wildwest"

[model_providers.wildwest]
name = "Wild West API"
base_url = "https://wildwestapi.com/v1"
env_key = "WILDWEST_API_KEY"
wire_api = "responses"

Then export the key and start Codex:

export WILDWEST_API_KEY=sk-ww-...
codex

The base URL keeps /v1 because the Responses client appends only /responses. The same block with codex exec runs it headless.

Why this model works in Codex

Codex edits files and runs commands only through function calls, so a model that cannot make one cannot do anything. DeepSeek V4.1 Flash Outlaw returned a correct tool call before it went on sale, reasons before it acts, and can write up to 393,216 tokens in one reply, the longest on the line. Its 1,048,576-token context holds a large repository's worth of files across a long session.

What is translated, and what is not

A Responses request becomes a chat-completions body on the way out and the answer becomes a Response object on the way back, with the real event sequence when streaming. Input items, instructions, function tools and tool results all map across.

  • previous_response_id is refused with a clear error. Codex sends the full input every turn, so it does not need it.
  • OpenAI's hosted tools (web_search, file_search, computer_use) run inside OpenAI's own stack, so they are not available. Function tools you define work normally.
  • The model is text only, so it cannot read a screenshot pasted into Codex. Hipshooter reads images on the same key.

The general setup, for any model on the line, is in the Codex CLI quickstart.

FAQ

Can Codex CLI use a non-OpenAI model?

Yes, through a model provider entry in config.toml that points at any endpoint serving the Responses API. Wild West API serves it at https://wildwestapi.com/v1/responses.

What wire_api should I set?

responses. Codex speaks the Responses API, and Wild West API translates it for the model.

Does it need a separate key?

No. The same Wild West API key works for the OpenAI, Anthropic and Responses formats.

Related

Uncensored AI models on one key

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