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.
Before You Start
Ensure you have the following prerequisites ready:
- BMAD Instance: Installed and reachable over SSH, with Claude Code and the BMAD skills already set up.
- Access Level: Root SSH access to your VPS.
- HostGator Account: An active account with an available AI credit balance.
Note: Before you begin, make sure you have an AI Credits API key and the Gateway endpoint on hand:
- How to Manage Your HostGator API Keys: create or retrieve the API key you'll use for AI Credits.
- Understanding AI Credits: get an overview of how the AI Credits system works.
- How to Purchase HostGator AI Credits: add funds if you don't already have a credit balance.
Once you have your key and the Gateway endpoint ready, you're set to continue with the steps below.
Linking HostGator AI Credits to BMAD
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.
- 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:Replaceyour_server_ipwith your actual server IP address.ssh root@your_server_ip - 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:
Add the following two lines at the end of the file:nano ~/.bashrcexport ANTHROPIC_BASE_URL="https://gateway.ai.hostgator.com"
export ANTHROPIC_AUTH_TOKEN="your_ai_credits_key"Replaceyour_ai_credits_keywith the AI Credits API key from your HostGator Portal. Claude Code still requiresANTHROPIC_API_KEYto be set to something. If your gateway authenticates purely throughANTHROPIC_AUTH_TOKEN, you can setANTHROPIC_API_KEYto any placeholder value alongside it. - Save the file (Ctrl+O, Enter, Ctrl+X), then reload it so the variables are active in your current session:
source ~/.bashrc
- Navigate to your project directory and start a Claude Code session as usual:
Becausecd ~/my-project
claudeANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENare already set, Claude Code skips the interactiveclaude authlogin flow and routes requests through your AI Credits balance instead. - Type
/bmad-help(or your version's equivalent help command) inside the session to confirm BMAD's agents are available.
/v1/messages), not the OpenAI Chat Completions format. Confirm with your HostGator AI Credits documentation or support that the Gateway endpoint above exposes an Anthropic-compatible route before relying on this in production. If it doesn't, requests from Claude Code/BMAD will fail even though the same key works fine in an OpenAI-compatible app like Langflow or Open WebUI.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:
- Connect to your server via SSH:
Replace
your_server_ipwith your actual server IP address.ssh root@your_server_ip - Check whether the variables are already set:
echo $ANTHROPIC_BASE_URL
echo $ANTHROPIC_AUTH_TOKEN - Open
~/.bashrcand either add or update theANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENlines with your AI Credits Gateway endpoint and key, as shown in Setting Up Your Connection for the First Time above. - Save the file and reload it:
source ~/.bashrc
- 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
Already have AI Credits connected? If you're just rotating the key, update the ANTHROPIC_AUTH_TOKEN value in ~/.bashrc, reload it with source ~/.bashrc, and start a new Claude Code session. Any session left open from before the change will keep using the old key until it's restarted.
Confirming the Connection Works
Once your AI Credits variables are set, confirm the connection works before starting a workflow:
- Navigate to a project directory and start Claude Code:
cd ~/my-project
claude - If Claude Code opens without prompting you through the
claude authlogin flow, it picked up your AI Credits variables successfully. - Send a simple prompt, such as "Hello, can you see this project's files?"
- If you get a response, the connection is working. Type
/bmad-helpto 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 withecho $ANTHROPIC_BASE_URL, and restart theclaudesession.
"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/messagesroute. - 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
claudefrom 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
claudesession and start a new one after updating the variables.