I have been using Factory Droid for the past 2 weeks and I like it. I don’t find that it’s worse than Claude Code (other than the lack of vi mode) and the startup time is much faster.

However, Droid expects API keys for Anthropic, but Claude Code Max subscriptions use OAuth tokens. CLIProxyAPI bridges this gap—it accepts API key requests from Factory and converts them to OAuth-authenticated requests.

Install CLIProxyAPI

brew install go
git clone https://github.com/luispater/CLIProxyAPI.git
cd CLIProxyAPI
go build -o cli-proxy-api ./cmd/server

Configure the Proxy

Create config.yaml:

port: 8317
remote-management:
  allow-remote: false
  secret-key: ""
auth-dir: "~/.cli-proxy-api"
debug: false
logging-to-file: false
usage-statistics-enabled: true
proxy-url: ""
request-retry: 3
quota-exceeded:
  switch-project: true
  switch-preview-model: true
auth:
  providers: []
generative-language-api-key: []

Authenticate with Claude

./cli-proxy-api --claude-login

This opens your browser for OAuth. Tokens are saved to ~/.cli-proxy-api/claude-{email}.json.

Configure Factory

Add to ~/.factory/config.json:

{
  "custom_models": [
    {
      "model": "claude-opus-4-1-20250805",
      "base_url": "http://localhost:8317",
      "api_key": "dummy-not-used",
      "provider": "anthropic"
    },
    {
      "model": "claude-sonnet-4-20250514",
      "base_url": "http://localhost:8317",
      "api_key": "dummy-not-used",
      "provider": "anthropic"
    }
  ]
}

The api_key field is required by Factory but ignored by the proxy.

Run

Start the proxy:

./cli-proxy-api --config config.yaml

Then start Factory Droid and select your model with /model.

If you need to re-authenticate later, run ./cli-proxy-api --claude-login again.

Update: Using Opus 4.6

Using Opus 4.6 with Factory Droid is easier than before—no need to update config.json. Just make sure the proxy is up to date and rebuild:

cd CLIProxyAPI
git pull
go build -o cli-proxy-api ./cmd/server

Start the proxy as before, then use /model in Factory Droid and choose claude-opus-4-6.

Update: Using OpenAI Codex

CLIProxyAPI also supports OpenAI Codex subscriptions. Same proxy, same setup—it routes to the right provider based on the model name.

Authenticate with Codex:

./cli-proxy-api --codex-login

Tokens are saved to ~/.cli-proxy-api/codex-{email}.json.

Add to the custom_models array in ~/.factory/config.json:

{
  "custom_models": [
    {
      "model": "gpt-5-codex",
      "base_url": "http://localhost:8317",
      "api_key": "dummy-not-used",
      "provider": "anthropic"
    },
    {
      "model": "gpt-5.4",
      "baseUrl": "http://localhost:8317",
      "apiKey": "dummy-not-used",
      "displayName": "gpt-5.4",
      "noImageSupport": false,
      "provider": "anthropic"
    }
  ]
}

Factory writes camelCase keys (baseUrl, apiKey, etc.) when it exports a custom entry. If your export also includes id or index, keep whatever Factory gave you — they only need to be unique per config. Droid accepts both naming styles in the same array.

One gotcha: set provider to "anthropic", not "openai". Droid with "openai" sends requests to /responses, which the proxy doesn’t serve at that path. With "anthropic", Droid hits /v1/messages instead, and the proxy routes correctly based on the model name.

Both Claude and Codex work simultaneously through the same proxy. Just switch models in Droid with /model—no need to restart anything.