> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CC Switch

> Use CC Switch to add DreamTo as a provider for Claude Code, Codex and Gemini CLI in one click and switch at any time.

[CC Switch](https://github.com/farion1231/cc-switch) is an open-source desktop tool that manages provider configs for command-line tools such as Claude Code, Codex and Gemini CLI in one place and switches between them in one click. Under the hood it rewrites those tools' config files for you, so the values you enter are the same as in each tool's manual setup.

## Prerequisites

* Download and install CC Switch from [GitHub Releases](https://github.com/farion1231/cc-switch/releases).
* The command-line tools you want to use (Claude Code / Codex / Gemini CLI) are installed.
* You have created an API Key on the **API Keys** page of the [DreamTo console](https://www.dreamto.ai/console).

> [!NOTE]
>
> CC Switch's UI text changes between versions, and the field names below follow common versions. If you can't find a field, just fill in the three essentials: request URL, API Key and model.

## Add DreamTo as a provider

At the top of CC Switch, select the app to configure, click **Add Provider** (**+**), and choose **Custom**. Set the name to `DreamTo` and the website to `https://www.dreamto.ai`.

> [tab] Claude Code
>
> | Field | Value |
> | - | - |
> | API Key | Your DreamTo API Key (`sk-xxxx`) |
> | Request URL | `https://api.dreamto.ai` (no `/v1`) |
> | API format (if shown) | Anthropic Messages (native) |
> | Auth field (if shown) | `ANTHROPIC_AUTH_TOKEN` |
> | Model | Main model, e.g. `claude-sonnet-5-5`; for the Opus / Sonnet / Haiku mappings, use `claude-opus-5-5`, `claude-sonnet-5-5` and `claude-haiku-5-5` |
>
> You can also switch to JSON editing and merge the following directly (same as on the [Claude Code](https://docs.dreamto.ai/en/integrations/claude-code.md) page):
>
> ```json theme={null}
> {
>   "env": {
>     "ANTHROPIC_BASE_URL": "https://api.dreamto.ai",
>     "ANTHROPIC_AUTH_TOKEN": "sk-xxxx",
>     "ANTHROPIC_MODEL": "claude-sonnet-5-5",
>     "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
>     "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
>     "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
>   }
> }
> ```

> [tab] Codex
>
> | Field | Value |
> | - | - |
> | API Key / auth.json | `{"OPENAI_API_KEY": "sk-xxxx"}` |
> | Request URL | `https://api.dreamto.ai/v1` (with `/v1`) |
> | Protocol / wire\_api | Responses |
> | Model | e.g. `gpt-6.2-sol` |
>
> The corresponding `config.toml` snippet:
>
> ```toml theme={null}
> model = "gpt-6.2-sol"
> model_provider = "dreamto"
>
> [model_providers.dreamto]
> name = "DreamTo"
> base_url = "https://api.dreamto.ai/v1"
> wire_api = "responses"
> requires_openai_auth = true
> ```
>
> `requires_openai_auth = true` means `OPENAI_API_KEY` is read from the `auth.json` that CC Switch writes. For manual setup, see [Codex CLI](https://docs.dreamto.ai/en/integrations/codex.md).

> [tab] Gemini CLI
>
> | Field | Value |
> | - | - |
> | API Key | Your DreamTo API Key (`sk-xxxx`) |
> | Request URL | `https://api.dreamto.ai` (no `/v1beta`) |
> | Model | e.g. `gemini-4-hydrogen` |
>
> The corresponding environment variables:
>
> ```bash theme={null}
> GOOGLE_GEMINI_BASE_URL=https://api.dreamto.ai
> GEMINI_API_KEY=sk-xxxx
> GEMINI_MODEL=gemini-4-hydrogen
> ```
>
> If your CC Switch version asks for a full URL, make sure the final request path is `https://api.dreamto.ai/v1beta/models/<model ID>:generateContent` without duplicated segments.

After saving, **enable** the DreamTo entry in the list, then **restart the corresponding command-line tool** (or open a new terminal) for the config to take effect.

## Local routing (optional)

Newer versions of CC Switch offer a **Local routing / proxy** feature that converts Claude Code's Anthropic-format requests into OpenAI Chat Completions format, so you can use GPT, DeepSeek and other Chat Completions models in Claude Code.

1. In **Settings → Routing**, turn on the main routing switch, confirm the status is running, and turn on routing for the relevant app (Claude / Codex).
2. In the provider config, set the API format to **OpenAI Chat Completions**, the request URL to `https://api.dreamto.ai/v1`, and the model to a Chat Completions model ID (such as `deepseek-v4.1-flash-1017`).
3. Keep CC Switch running while you use it.

> [!TIP]
>
> You don't need local routing if you only use Claude models: DreamTo supports Anthropic Messages natively, so Claude Code can connect directly.

## Verify and troubleshoot

* After enabling, open a new terminal, run `claude` / `codex` / `gemini`, and send a message to test. In Claude Code, `/status` shows the current address.
* **Still using the old config**: confirm DreamTo is the active entry and that you restarted the tool. Check whether an environment variable of the same name in your shell (such as `ANTHROPIC_API_KEY`) is overriding the config file.
* **401**: the key is wrong or contains spaces.
* **404 / model not found**: check that the request URL includes or omits `/v1` as shown in the tables above, and that the model ID matches the Model Marketplace.
* **Routing is on but requests bypass the proxy**: make sure both the main routing switch and the app's routing switch are on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.