# How to use Codewhale with Subconscious

> To use Codewhale with Subconscious, add an `openai-compatible` provider named subconscious to `~/.codewhale/config.toml` with base URL `https://api.subconscious.dev/v1`, model `subconscious/glm-5.3-marathon` and `api_key_env = "SUBCONSCIOUS_API_KEY"`, and make it the default provider. Run codewhale and it uses Subconscious, billed per token.

Canonical page: https://www.subconscious.dev/agents/terminal-and-ide/codewhale
Category: [Terminal and IDE agents](https://www.subconscious.dev/agents/terminal-and-ide)
Last verified: 2026-09-30
Codewhale: https://codewhale.net
Source: https://github.com/Hmbown/Codewhale

## Before you start

- A Subconscious account and API key

## Set up Codewhale

### 1. Install Codewhale

The install script is the primary method; npm and Cargo builds also exist.

```bash
curl -fsSL https://codewhale.net/install.sh | sh
```

### 2. Create a Subconscious API key

Sign in at https://platform.subconscious.dev, create an API key, and export it so the tool can read it.

```bash
export SUBCONSCIOUS_API_KEY="your_key"
```

### 3. Add Subconscious as a provider

The top-level provider line makes Subconscious the default.

```toml
provider = "subconscious"

[providers.subconscious]
kind = "openai-compatible"
base_url = "https://api.subconscious.dev/v1"
model = "subconscious/glm-5.3-marathon"
api_key_env = "SUBCONSCIOUS_API_KEY"
```

### 4. Start Codewhale

Run codewhale in your project, or pass --provider subconscious to pick it for one session.

```bash
codewhale
```

## Connection details

- OpenAI-compatible base URL: https://api.subconscious.dev/v1
- Anthropic-compatible base URL: https://api.subconscious.dev
- API key: From subc login or the Subconscious dashboard
- Model: subconscious/glm-5.3-marathon
- Multimodal, high-throughput model: subconscious/deepseek-v4.1-flash-marathon

Full API reference: https://docs.subconscious.dev

## Frequently asked questions

### Which Subconscious model should I use with Codewhale?

Start with subconscious/glm-5.3-marathon, an open frontier coding model built for long agent runs. subconscious/deepseek-v4.1-flash-marathon is a cheaper, high-throughput alternative that also takes image input. Use the full model ID, including the subconscious/ prefix.

### Is Codewhale on Subconscious OpenAI- or Anthropic-compatible?

This guide connects Codewhale through the OpenAI-compatible Subconscious API. Subconscious serves both formats: OpenAI Chat Completions at https://api.subconscious.dev/v1 and Anthropic Messages at https://api.subconscious.dev.

### How is Codewhale usage on Subconscious billed?

Per token by default, with no commitment. Heavy users can switch to a monthly token plan: a fixed price for a large daily token allowance shared across your team.
