Skip to content

Claude Code Integration

Claude Code is Anthropic’s official terminal-based coding agent. It understands your entire codebase and helps you code faster through natural language commands. This guide shows you how to connect Claude Code to LLMCloud.

On first use, Claude Code normally shows an onboarding screen that attempts to authenticate with Anthropic directly. To skip this and use LLMCloud instead, choose one of the following methods:

Create or edit ~/.claude.json:

{
"hasCompletedOnboarding": true,
"hasTrustDialogAccepted": true
}

Edit ~/.claude/settings.json:

{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_llmcloud_api_key",
"ANTHROPIC_BASE_URL": "https://llmcloud.studio",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-opus-4.5-thinking",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-4.5-thinking",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-haiku-4.5",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"API_TIMEOUT_MS": "600000",
"BASH_DEFAULT_TIMEOUT_MS": "600000",
"BASH_MAX_TIMEOUT_MS": "600000",
"MCP_TIMEOUT": "30000",
"MCP_TOOL_TIMEOUT": "600000",
"CLAUDE_API_TIMEOUT": "600000"
}
}
ModelModel ID
Claude Opus 4.6anthropic/claude-opus-4.6
Claude Opus 4.5 Thinkinganthropic/claude-opus-4.5-thinking
Claude Sonnet 4.6anthropic/claude-sonnet-4.6
Claude Sonnet 4.5anthropic/claude-sonnet-4.5
Claude Sonnet 4.5 Thinkinganthropic/claude-sonnet-4.5-thinking
Claude Haiku 4.5anthropic/claude-haiku-4.5
Gemini 3 Flash Previewgoogle/gemini-3-flash-preview
Gemini 3 Pro Previewgoogle/gemini-3-pro-preview

Start Claude Code in your project directory:

Terminal window
cd your-project
claude

Update the model environment variables in ~/.claude/settings.json:

{
"env": {
"ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-4.5-thinking"
}
}

Problem: Changes to ~/.claude/settings.json don’t take effect

Solutions:

  1. Close all Claude Code sessions and open a new terminal
  2. Delete ~/.claude/settings.json and reconfigure—Claude Code will generate a new file
  3. Validate JSON syntax (check for missing or extra commas)

Problem: “API Key invalid or unauthorized” error

Solutions:

Problem: Unable to connect to API

Solutions:

  • Confirm Base URL is exactly https://llmcloud.studio (no trailing slash, no /v1)
  • Check your internet connection

Problem: “Model not found” error

Solutions:

  • Use the exact model ID format (e.g., anthropic/claude-sonnet-4.5-thinking)
  • Verify the model is available in your subscription