How to Connect HostGator AI Credits to Paperclip
HostGator AI Credits balance can run your Paperclip agents too. Credits pass through the HostGator AI Gateway — a single OpenAI-compatible endpoint that connects you to supported models such as GPT, Claude, Gemini, and Grok. Model availability varies by plan and may change. You don't need a separate account with each model provider.
This guide is for anyone who already has Paperclip installed and running on a HostGator Self-Managed VPS, with an admin account already set up.
What You Need Before You Start
Before you begin, make sure you have an AI Credits API key and Gateway endpoint ready.
Need to create a key first? See How to Manage Your HostGator API Keys.
New to AI Credits? Check out Understanding AI Credits.
Don't have a credit balance yet? See How to Purchase HostGator AI Credits.
For current AI Credits pricing and supported models, visit HostGator: AI Models and Credit Pricing.
- Root/SSH access to your Paperclip server.
- A HostGator account with an active AI Credits balance. AI Credits are required to use this connection method.
- An AI Credits API key and your Gateway endpoint URL.
AI Credits deduct from your prepaid balance instead of billing you directly through the model provider, so you manage one balance and one key across all models included in your plan.
Connect Paperclip to the HostGator AI Gateway
Paperclip can run agent tasks through the Codex adapter (codex_local). You'll point Paperclip's OpenAI-compatible provider settings at the HostGator AI Gateway, then choose your adapter in the Paperclip dashboard.
-
Connect to your server via SSH.
Replaceyour_server_ipwith your actual server IP address.ssh root@your_server_ip -
Open the service editor:
systemctl edit paperclip -
Paste this under
[Service], replacing the key with your HostGator AI Gateway key:Replaceyour_hostgator_ai_gateway_keywith your actual API Key.[Service] Environment="PAPERCLIP_CODEX_PROVIDERS={\"providers\":{\"hostgator\":{\"name\":\"HostGator AI Gateway\",\"base_url\":\"https://gateway.ai.hostgator.com\",\"env_key\":\"OPENAI_API_KEY\",\"wire_api\":\"responses\"}},\"model_provider\":\"hostgator\"}" Environment="OPENAI_API_KEY=your_hostgator_ai_gateway_key"Example Output
### Editing /etc/systemd/system/paperclip.service.d/override.conf ### Anything between here and the comment below will become the contents of the drop-in file [Service] Environment=BETTER_AUTH_SECRET=test123a1abce4783bcee11950e30d48544961779a Environment=BETTER_AUTH_BASE_URL=http://12.3.3.123:3100 Environment=HOST=12.3.3.123 Environment=PAPERCLIP_PUBLIC_URL=http://12.3.3.123:3100 Environment=PAPERCLIP_DEPLOYMENT_MODE=authenticated Environment="PAPERCLIP_CODEX_PROVIDERS={\"providers\":{\"hostgator\":{\"name\":\"HostGator AI Gateway\",\"base_url\":\"https://gateway.ai.hostgator.com\",\"env_key\":\"OPENAI_API_KEY\",\"wire_api\":\"responses\"}},\"model_provider\":\"hostgator\"}" Environment="OPENAI_API_KEY=sk-abctest123LidI6612" ### Edits below this comment will be discarded ### /etc/systemd/system/paperclip.service # [Unit] # Description=Paperclip # Documentation=https://github.com/paperclipai/paperclip # After=network.target # # [Service] # Type=simple # User=paperclip # WorkingDirectory=/opt/paperclip/app # ExecStart=/bin/bash -c 'pnpm dev --tailscale-auth' # Restart=always # RestartSec=5 # StartLimitIntervalSec=60 # StartLimitBurst=3 # Environment=NODE_ENV=production # Environment=PORT=3100 # Environment=HOME=/opt/paperclip # StandardOutput=append:/var/log/paperclip/paperclip.log # StandardError=append:/var/log/paperclip/paperclip.log - Save and exit (
Ctrl+O,Enter,Ctrl+X). -
Restart the Paperclip service:
systemctl daemon-reload && systemctl restart paperclipThen confirm it started successfully:
systemctl status paperclipExample Output
● paperclip.service - Paperclip Loaded: loaded (/etc/systemd/system/paperclip.service; enabled; preset: enabled) Drop-In: /etc/systemd/system/paperclip.service.d └─override.conf Active: active (running) since Mon 2026-09-21 22:54:04 UTC; 9s ago Docs: https://github.com/paperclipai/paperclip Main PID: 19112 (node) Tasks: 169 (limit: 9500) Memory: 555.2M (peak: 745.9M) CPU: 19.092s CGroup: /system.slice/paperclip.service
Pick Your AI Model in Paperclip
Once your environment variables are configured, finish up by choosing which model Paperclip should use by default.
-
Open your Paperclip dashboard at
http://your_server_ip:3100.Replaceyour_server_ipwith your actual server IP address. - Navigate to Agents → CEO → Configurations.

-
Choose a default model, based on which ones your HostGator Gateway route supports.
Check AI Models and Credit Pricing for more information about the models supported. - Ensure your desired Adapter type is selected and then click Save.
Test the Connection
- Send a test prompt such as "reply with the word ready", or click Test Environment (or Run Heartbeat) to trigger a diagnostic run.
- Navigate to the Runs tab to review the live execution status and output.
- It worked: Your agent responds with "ready", and the run log confirms requests pass through your configured HostGator Gateway URL.
- It didn't work: If you receive a 401 Unauthorized error, confirm that your
OPENAI_API_KEYandPAPERCLIP_CODEX_PROVIDERSsettings are correct in your server's service environment, then restart Paperclip usingsystemctl daemon-reload && systemctl restart paperclip.
No reply? See the fixes below.
Common Problems and Fixes
If you run into trouble connecting Paperclip to the HostGator AI Gateway, match what you're seeing to one of the problems below.
401 Unauthorized / "Invalid API key"
Why it happens: Your HostGator AI Credit API key is wrong, expired, mistyped, or was deleted.
How to fix it: Check the key's status in HostGator Portal → AI Tooling, copy a fresh one, and replace OPENAI_API_KEY with it.
402 Payment Required / "Insufficient credits"
Why it happens: Your AI Credit balance is empty.
How to fix it: Add more credits to your balance in HostGator Portal → AI Tooling.
404 Error/Can't Connect
Why it happens: The base_url inside your PAPERCLIP_CODEX_PROVIDERS setting is wrong.
How to fix it: Make sure the base_url is set to https://gateway.ai.hostgator.com (no trailing slash).
Paperclip Isn't Sending Requests Through the Gateway
Why it happens: The service wasn't restarted, or the agent isn't using a supported adapter.
How to fix it: Run systemctl daemon-reload && systemctl restart paperclip after making changes, and double-check the agent is set to the Codex (codex_local) adapter.
Getting a "Model Not Allowed" Message
Why it happens: That model isn't included in your AI Credits plan.
How to fix it: Check which models are supported in HostGator Portal → AI Tooling.