Loading...

Knowledge Base

How to Connect HostGator AI Credits to BMAD

BMAD workflows can run entirely on the AI Credits balance attached to your HostGator account. BMAD (Breakthrough Method for Agile AI-Driven Development) has no dedicated model-configuration screen of its own. It's a collection of agent skills and slash commands layered into Claude Code, so it simply picks up whichever backend that Claude Code session is already authenticated against. Wiring AI Credits into BMAD comes down to pointing that Claude Code session at the HostGator AI Credits Gateway, either instead of or alongside a personal Anthropic API key.

This guide assumes BMAD is already up and running on a HostGator Self-Managed VPS.

BMAD's agents (Analyst, PM, Architect, Dev, QA, and others) run as slash commands inside Claude Code. There's no separate "model provider" screen to configure. Claude Code reads its connection details from environment variables the first time it's launched in a session, and every BMAD agent inherits that same connection.

Setting Up Your Connection for the First Time

Follow these steps to connect to your VPS and configure your AI Credits key.

  1. Connect to your server via SSH.
    Use your server IP and credentials with an SSH client, follow the prompts, and enter your root password when asked:
    ssh root@your_server_ip
  2. Set your AI Credits connection details as environment variables in your shell profile so they're loaded automatically every time you start a session. Open the profile file:
    nano ~/.bashrc
    Add the following two lines at the end of the file:
    export ANTHROPIC_BASE_URL="https://gateway.ai.hostgator.com"
    export ANTHROPIC_AUTH_TOKEN="your_ai_credits_key"
  3. Save the file (Ctrl+O, Enter, Ctrl+X), then reload it so the variables are active in your current session:
    source ~/.bashrc
  4. Navigate to your project directory and start a Claude Code session as usual:
    cd ~/my-project
    claude
    Because ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are already set, Claude Code skips the interactive claude auth login flow and routes requests through your AI Credits balance instead.
  5. Type /bmad-help (or your version's equivalent help command) inside the session to confirm BMAD's agents are available.

Switching an Existing BMAD Install to AI Credits

If BMAD is already authenticated a different way, such as through claude auth with a Claude subscription, a personal ANTHROPIC_API_KEY, or a third-party platform like Bedrock or Vertex AI, and you want to switch to AI Credits instead:

  1. Connect to your server via SSH:
    ssh root@your_server_ip
  2. Check whether the variables are already set:
    echo $ANTHROPIC_BASE_URL
    echo $ANTHROPIC_AUTH_TOKEN
  3. Open ~/.bashrc and either add or update the ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN lines with your AI Credits Gateway endpoint and key, as shown in Setting Up Your Connection for the First Time above.
  4. Save the file and reload it:
    source ~/.bashrc
  5. Start (or restart) your Claude Code session. Environment variables are only read at launch, so any Claude Code session already running needs to be exited and reopened for the change to take effect:
    cd ~/my-project
    claude

Confirming the Connection Works

Once your AI Credits variables are set, confirm the connection works before starting a workflow:

  1. Navigate to a project directory and start Claude Code:
    cd ~/my-project
    claude
  2. If Claude Code opens without prompting you through the claude auth login flow, it picked up your AI Credits variables successfully.
  3. Send a simple prompt, such as "Hello, can you see this project's files?"
  4. If you get a response, the connection is working. Type /bmad-help to confirm the agent set loads normally.

Troubleshooting

If your connection test doesn't work as expected, review the items below to identify the likely cause and next steps.

Claude Code Still Prompts for claude auth Login

  • Likely Cause: Environment variables weren't loaded before Claude Code started.
  • What to Check: Run source ~/.bashrc, confirm with echo $ANTHROPIC_BASE_URL, and restart the claude session.

"Insufficient Credits" or Similar Error

  • Likely Cause: AI credit balance is depleted.
  • What to Check: Check your balance in the Portal AI Tooling page and add more credits.

"Invalid API Key" or Authentication Error

  • Likely Cause: Key was mistyped, expired, or deleted.
  • What to Check: Re-copy the key from the Portal, update ANTHROPIC_AUTH_TOKEN, and reload the shell profile.

Requests Fail Even With a Valid Key

  • Likely Cause: The Gateway endpoint doesn't expose an Anthropic-compatible /v1/messages route.
  • What to Check: Confirm with support or documentation whether the AI Credits Gateway supports the Anthropic Messages API, not just an OpenAI-compatible format.

/bmad-help or Agent Commands Aren't Recognized

  • Likely Cause: BMAD skills weren't installed, or you're in the wrong project directory.
  • What to Check: Confirm BMAD was installed for this project and that you're running claude from inside it.

Change to ~/.bashrc Doesn't Seem to Apply

  • Likely Cause: An existing Claude Code session is still running with the old environment.
  • What to Check: Exit the running claude session and start a new one after updating the variables.

Loading...