Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt

Use this file to discover all available pages before exploring further.

Claude Code is Anthropic’s official CLI. By pointing it at GMI Cloud via ANTHROPIC_BASE_URL, you get the same Sonnet/Opus/Haiku models on a pay-as-you-go basis: no subscription, no session caps, no rate-limit walls on long sessions.

Prerequisites

  • A GMI Cloud account at console.gmicloud.ai
  • Claude Code installed
  • A terminal running zsh or bash
  • About 5 minutes

Step 1. Get your GMI API key

  1. Sign in to console.gmicloud.ai.
  2. Open Organization Settings → API Keys.
  3. Create a new key and copy it immediately.

Step 2. Open your terminal

On macOS, open Terminal (or iTerm). On Linux, use your default shell.

Step 3. Edit your shell config

nano ~/.zshrc
If you’re on bash, use ~/.bashrc instead.

Step 4. Append the GMI environment variables

Scroll to the end of the file and paste these lines, replacing your_gmi_api_key_here with the key you copied:
export ANTHROPIC_BASE_URL=https://api.gmi-serving.com
export ANTHROPIC_AUTH_TOKEN=your_gmi_api_key_here
export API_TIMEOUT_MS=600000
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export ANTHROPIC_MODEL="anthropic/claude-sonnet-4.6"
export ANTHROPIC_SMALL_FAST_MODEL="anthropic/claude-sonnet-4.6"
export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-4.6"
export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-4.6"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="anthropic/claude-haiku-4.6"

Step 5. Save and reload

In nano: Ctrl + X, then Y, then Enter. Reload the shell so the variables take effect:
source ~/.zshrc

Step 6. Log out of any prior Claude session

claude /logout

Step 7. Launch Claude Code

claude
Claude Code skips the auth prompt and connects straight to GMI Cloud. No subscription, no rate limits.

Tips

  • Want a different default? Change ANTHROPIC_MODEL to any model in the catalog.
  • API_TIMEOUT_MS=600000 (10 minutes) helps for long tool-use sessions; lower it if you prefer faster fail-fast behaviour.
  • The env vars only apply to shells started after source ~/.zshrc. Open a fresh terminal if claude still asks you to log in.

Next steps