Skip to main content
Claude Code is Anthropic’s command-line coding assistant. It reads code, edits files and runs commands in your terminal. It uses the Anthropic Messages protocol, which DreamTo supports natively, so you only need to set a few environment variables.

Prerequisites

  • Claude Code is installed (claude --version prints a version). See the official docs for installation.
  • You have created an API Key on the API Keys page of the DreamTo console.
  • You have picked a Claude model ID in the Model Marketplace, such as claude-sonnet-5-5 or claude-opus-5-5. For the full list, see Anthropic Messages.

Key settings

Older versions used ANTHROPIC_SMALL_FAST_MODEL for the background model. It is now deprecated; use ANTHROPIC_DEFAULT_HAIKU_MODEL in newer versions. Setting both does not conflict.

Setup

1

Edit settings.json (recommended)

Edit the user-level config file ~/.claude/settings.json (%USERPROFILE%\.claude\settings.json on Windows) and add the following under env. If the file already exists, merge only the env field and keep your other settings.
~/.claude/settings.json
Values in settings.json are passed as-is, with no shell expansion of ~, $HOME and the like. To apply the settings to a single project only, put them in .claude/settings.local.json in the project directory (not committed).
2

Or use environment variables

For quick tests or CI, you can set them directly in your shell:
To make them permanent, add the export lines to ~/.zshrc / ~/.bashrc. On Windows, use “Edit the system environment variables” or setx.
3

Skip first-run onboarding (if needed)

On first launch, Claude Code may ask you to sign in to an Anthropic account. When using your own gateway, add "hasCompletedOnboarding": true at the top level of ~/.claude.json (C:\Users\<username>\.claude.json on Windows), save, and reopen your terminal.
4

Launch and verify

Reopen your terminal, run claude in your project directory, and type /status to see the current Base URL and model. Then send “Hello”; a normal reply means the setup works. You can also test quickly in non-interactive mode:

Switching models

  • At launch: claude --model claude-opus-5-5
  • During a session: type /model and choose the opus / sonnet / haiku alias (which calls the model set in the matching ANTHROPIC_DEFAULT_*_MODEL above), or enter a full model ID.
Claude Code relies on tool calling, long context and streaming, so Claude models are recommended. Whether other models work reliably in Claude Code depends on how well they support tool calling over the Anthropic Messages protocol.

FAQ

  • Make sure ANTHROPIC_AUTH_TOKEN (or ANTHROPIC_API_KEY) is a key from the DreamTo console.
  • If you previously signed in to an Anthropic account, or an old ANTHROPIC_API_KEY is still set in your shell, it may override the new config. Run unset ANTHROPIC_API_KEY and retry, or keep all settings in settings.json.
  • Restart Claude Code after editing settings.json; running sessions don’t pick up new values.
  • Don’t set ANTHROPIC_BASE_URL to https://api.dreamto.ai/v1, or requests go to /v1/v1/messages.
  • Check that ANTHROPIC_MODEL and all three ANTHROPIC_DEFAULT_*_MODEL values are model IDs that exist in the Model Marketplace. Background tasks use the Haiku model; if it is wrong, the main conversation works but errors appear intermittently.
Newer versions of Claude Code send pre-release anthropic-beta headers and related fields. If you hit beta-related parameter errors, add "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1" to env to drop them.
Raise API_TIMEOUT_MS (in milliseconds; default 600000). If you’re behind a corporate proxy, make sure it doesn’t buffer or truncate the SSE stream.
Set "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" to turn off auto-updates, telemetry, error reporting and other non-essential network requests. Note that setting it to 0 also takes effect; delete it to restore the defaults.
settings.json applies to the command-line Claude Code. The Claude Code extensions for JetBrains and VS Code reuse the same config. If your desktop app doesn’t read this file, you can manage it with CC Switch.