How to Connect Bluehost AI Credits to BMAD
Power BMAD directly using the AI Credits balance tied to your Bluehost account. BMAD (Breakthrough Method for Agile AI-Driven Development) doesn't have its own model settings screen — it's a set of specialized agent skills and slash commands that install into Claude Code, so it always uses whatever backend Claude Code itself is authenticated with. Connecting AI Credits to BMAD means pointing the underlying Claude Code session at the Bluehost AI Credits Gateway instead of (or in addition to) a personal Anthropic API key.
This article assumes you already have BMAD running on a Bluehost server. The process below is the same for Self-Managed VPS and Virtual Dedicated Server (VDS).
If you haven't installed BMAD - AI Agent Development Framework yet, see:
- Purchase a Self-Managed VPS with BMAD - AI Agent Development Framework Installation
- Purchase a Virtual Dedicated Server with BMAD - AI Agent Development Framework Installation
- Reimage Your Server for BMAD - AI Agent Development Framework Installation
Important: 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 or VDS.
- Bluehost Account: An active account with an available AI credit balance.
Note: You will need an AI Credits API key and the Gateway endpoint. If you haven't created a key yet, see How to Manage Your Bluehost API Keys. For an overview of how the system works, see Understanding AI Credits. If you don't have a credit balance yet, see How to Purchase Bluehost AI Credits.
Connect Bluehost 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.
First Time Setup
Follow these steps to connect to your VPS or VDS 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:Important: Replace
your_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 ~/.bashrc
export ANTHROPIC_BASE_URL="https://gateway.ai.bluehost.com" export ANTHROPIC_AUTH_TOKEN="your_ai_credits_key"Important: Replace
your_ai_credits_keywith the AI Credits API key from your Bluehost 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 claude
ANTHROPIC_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.
Warning: Is the Gateway Anthropic-compatible? Claude Code expects an endpoint that implements Anthropic's Messages API (/v1/messages), not the OpenAI Chat Completions format. Confirm with your Bluehost 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.
Warning: Verify before publishing: Unlike gstack, which installs under a dedicated gstack system user, BMAD's Bluehost image may run directly as root (matching the plain Claude Code image) or under its own dedicated user. Confirm which applies to your BMAD template before finalizing these steps.
Adding AI Credits to an Existing BMAD Install
If BMAD is already authenticated a different way — 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:
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 First Time Setup 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
Tip: 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.
Warning: Keep an eye on your AI credit balance in the Bluehost Portal. If your balance runs out, BMAD's Claude Code sessions will fail to authenticate until you add more credits.
Test Your Connection
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, use the table below to identify the likely cause and next steps.
| Issue | Likely Cause | What to Check |
|---|---|---|
Claude Code still prompts for claude auth login |
Environment variables weren't loaded before Claude Code started | Run source ~/.bashrc, confirm with echo $ANTHROPIC_BASE_URL, and restart the claude session |
| "Insufficient credits" or similar error | AI credit balance is depleted | Check your balance in the Bluehost Portal AI Tooling page and add more credits |
| "Invalid API key" or authentication error | Key was mistyped, expired, or deleted | Re-copy the key from the Bluehost Portal, update ANTHROPIC_AUTH_TOKEN, and reload the shell profile |
| Requests fail even with a valid key | The Gateway endpoint doesn't expose an Anthropic-compatible /v1/messages route |
Confirm with Bluehost 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 |
BMAD skills weren't installed, or you're in the wrong project directory | Confirm BMAD was installed for this project and that you're running claude from inside it |
Change to ~/.bashrc doesn't seem to apply |
An existing Claude Code session is still running with the old environment | Exit the running claude session and start a new one after updating the variables |
Summary
BMAD itself has no connection settings — it inherits whatever backend the underlying Claude Code session is authenticated with. To run BMAD on AI Credits, set ANTHROPIC_BASE_URL to the Bluehost AI Credits Gateway and ANTHROPIC_AUTH_TOKEN to your AI Credits key in your shell profile, then start (or restart) a Claude Code session. Confirm the Gateway supports the Anthropic Messages API before relying on this in production, and test with a simple prompt before starting a full BMAD workflow.