mcpField
Z
zeabur-ai-hub

zeabur-ai-hub

github.com/zeaburCloud & DevOps39141 installsUpdated 7w ago
Repository

About zeabur-ai-hub

A management skill for developers using Zeabur AI Hub. It covers CLI-based account and key operations, usage checks, and calling the OpenAI-compatible API.

Key features

  1. 01Check balance, keys, and recharge status
  2. 02Create and delete API keys
  3. 03Add balance and inspect model usage
  4. 04Configure automatic recharging
  5. 05Use the OpenAI-compatible API endpoint

Use cases

  1. 01Review AI Hub balance and keys
  2. 02Create or remove an app API key
  3. 03Check monthly spend and model costs
  4. 04Set up low-balance auto-recharge

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zeabur/agent-skills --skill zeabur-ai-hub

After installing, type/zeabur-ai-hubin Claude Code to confirm it loaded.

Details

From the project README

Zeabur AI Hub Management

Always use npx zeabur@latest to invoke Zeabur CLI. Never use zeabur directly or any other installation method. If npx is not available, install Node.js first.

API Endpoints

AI Hub is OpenAI-compatible. Users can pick the region closest to them:

RegionEndpoint
Tokyo, Japan (HND1)https://hnd1.aihub.zeabur.ai/
San Francisco, USA (SFO1)https://sfo1.aihub.zeabur.ai/
Quick Start (OpenAI SDK)

JavaScript / TypeScript:

import OpenAI from "openai";

const client = new OpenAI({
    baseURL: "https://hnd1.aihub.zeabur.ai/v1",  // or sfo1
    apiKey: "sk-xxxxxxxxxxxxxxxx",              // from AI Hub dashboard
});

const stream = await client.chat.completions.create({
    model: "claude-sonnet-4-5",  // any model available on AI Hub
    messages: [{ role: "user", content: "Hello!" }],
    stream: true,
});

Python:

from openai import OpenAI

client = OpenAI(
    base_url="https://hnd1.aihub.zeabur.ai/v1",  # or sfo1
    api_key="sk-xxxxxxxxxxxxxxxx",              # from AI Hub dashboard
)

stream = client.chat.completions.create(
    model="claude-sonnet-4-5",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)

curl:

curl https://hnd1.aihub.zeabur.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-5","messages":[{"role":"user","content":"Hello!"}]}'
Other SDK Compatibility
  • Anthropic SDK: set baseURL / base_url to the endpoint above
  • Vercel AI SDK (@ai-sdk/openai): set baseURL to the endpoint above
Environment Variables

When users deploy apps on Zeabur, suggest setting:

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx
OPENAI_BASE_URL=https://hnd1.aihub.zeabur.ai/v1

Most OpenAI-compatible libraries will pick these up automatically.

Check AI Hub Status

npx zeabur@latest ai-hub status -i=false
npx zeabur@latest ai-hub status -i=false --json

Shows tenant balance, API keys, and auto-recharge settings.

API Key Management

# List all keys
npx zeabur@latest ai-hub keys list -i=false
npx zeabur@latest ai-hub keys ls -i=false --json

# Create a new key (optional alias)
npx zeabur@latest ai-hub keys create --alias "my-app" -i=false

# Delete a key
npx zeabur@latest ai-hub keys delete --key-id <key-id> -i=false

The API key is only shown once at creation time. Make sure the user saves it immediately.

Add Balance

# Add $10 to AI Hub balance
npx zeabur@latest ai-hub add-balance --amount 10 -i=false
  • Amount is in whole dollars (integer).
  • Deducts from Zeabur account credits. If insufficient credits and no linked card, a checkout page opens in the browser automatically.

Check Usage

# Current month usage
npx zeabur@latest ai-hub usage -i=false

# Specific month
npx zeabur@latest ai-hub usage --month 2026-03 -i=false
npx zeabur@latest ai-hub usage --month 2026-03 -i=false --json

Shows total spend and per-model cost breakdown. --month must be in YYYY-MM format.

Auto-Recharge Settings

# Enable: recharge $20 when balance drops below $5
npx zeabur@latest ai-hub auto-recharge --threshold 5 --amount 20 -i=false

# Disable auto-recharge
npx zeabur@latest ai-hub auto-recharge --threshold 0 --amount 0 -i=false

Both --threshold and --amount are in whole dollars.

Comments

Markdown supported