Claude Code

Use SeaCloud API as the backend for Claude Code to access more AI models and better pricing.

Claude Code is Anthropic's official command-line AI coding assistant. By configuring SeaCloud API, you can use GPT-4, Claude, Gemini, and many other models.

Prerequisites

  • Node.js 18 or higher

  • SeaCloud API key (create one in Settings)

1

Install Claude Code

Install Claude Code CLI using npm:

Install with npm
npm install -g @anthropic-ai/claude-code

Or install using shell script (macOS/Linux):

Install with script
curl -fsSL https://claude.ai/install.sh | sh
2

Configure SeaCloud API

SeaCloud provides two configuration methods: global config file or environment variables. Config file method is recommended.

Create global config file ~/.claude/settings.json:

Create config directory and file
mkdir -p ~/.claude
vim ~/.claude/settings.json

Config file content:

πŸ“„ ~/.claude/settings.json

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://openresty-gateway.api.seaart.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxxxxxxxxx",
    "ANTHROPIC_MODEL": "claude-sonnet-4-5"
  }
}

πŸ’‘ Get these config parameters: Go to SeaCloud β†’ Models page β†’ Select a model (e.g., Claude Sonnet 4.5) β†’ Click "API" tab β†’ Copy config parameters

Using Environment Variables

Add the following to your shell profile:

πŸ“„ ~/.bashrc or ~/.zshrc

Shell profile
# SeaCloud API Configuration
export ANTHROPIC_BASE_URL="https://openresty-gateway.api.seaart.ai"
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxxxxxxxxxxxxxxx"
export ANTHROPIC_MODEL="claude-sonnet-4-5"
3

Switch Models

You can change the ANTHROPIC_MODEL variable anytime to switch models. SeaCloud supports all major AI models:

Model Type
Recommended Model
Features

Performance

claude-opus-4-5

Best reasoning, complex tasks

Standard

claude-sonnet-4-5

Daily development, balanced

Cost-Effective

gemini-3-pro-preview

Fast response, low cost

Update model (modify config file or environment variable):

πŸ“„ ~/.claude/settings.json

Change model in settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://openresty-gateway.api.seaart.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxxxxxxxxx",
    "ANTHROPIC_MODEL": "gemini-3-pro-preview"  // Change this
  }
}
4

Start Your Session

Navigate to your project directory and start Claude Code:

Start Claude Code
cd /path/to/your/project
claude

You are now connected! Any prompt you send will be routed through SeaCloud.

Verify Configuration

Run the /status command in Claude Code to verify your connection:

/status
> /status
Auth token: ANTHROPIC_AUTH_TOKEN
Base URL: https://openresty-gateway.api.seaart.ai
Model: claude-sonnet-4-5

Troubleshooting

Error: API Error: Connection error

Cause: Single ToDo task is too large, causing execution timeout

Solution: Tell Claude Code to break down tasks into smaller steps

Prompt to break down task
> Please break this task into smaller steps, do one small change at a time
Mac Error: env: node: No such file or directory

Cause: Node.js environment not properly loaded in current terminal session

Solution:

Error: API Error: 400 tools.3.custom.input_examples: Extra inputs are not permitted

Cause: Official Claude Code bug, will be fixed in next version update

Temporary Solution:

Other Configuration Issues

Solution:

  • Check if environment variables are correctly set (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL)

  • Verify API key format is correct (starts with sk-)

  • Ensure chosen model supports tool calling feature

  • Check if account has sufficient credits: View balance

Need Help? If you encounter issues integrating Claude Code, check the full API documentation or contact our support team.

Last updated