Loading...
Loading...
Use when managing AI Hub account, API keys, balance, usage, or API endpoints. Use when user says "AI Hub", "add AI credits", "create API key", "check AI usage", "auto-recharge", "AI Hub endpoint", "AI Hub base URL", "how to use AI Hub API", "LLM API", "AI API", "OpenAI compatible", "Anthropic API", "GPT", "Claude", "Gemini", "DeepSeek", or "Grok" in the context of Zeabur.
npx skill4agent add zeabur/agent-skills zeabur-ai-hubAlways useto invoke Zeabur CLI. Never usenpx zeabur@latestdirectly or any other installation method. Ifzeaburis not available, install Node.js first.npx
| Region | Endpoint |
|---|---|
| Tokyo, Japan (HND1) | |
| San Francisco, USA (SFO1) | |
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,
});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 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!"}]}'baseURLbase_url@ai-sdk/openaibaseURLOPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx
OPENAI_BASE_URL=https://hnd1.aihub.zeabur.ai/v1npx zeabur@latest ai-hub status -i=false
npx zeabur@latest ai-hub status -i=false --json# 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# Add $10 to AI Hub balance
npx zeabur@latest ai-hub add-balance --amount 10 -i=false# 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--monthYYYY-MM# 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--threshold--amount