Agent & Developer Docs
Everything you need to build AI agents and integrations on KibiBot — API reference, CLI, Kibi LLM Gateway, and OpenClaw setup.
Overview
KibiBot exposes a full Agent API so your AI agent or application can create tokens, check balances, and call frontier AI models — all with a single kb_... API key.
Create tokens, check quota, manage balances — REST endpoints at api.kibi.bot
Command-line tool for humans and CI pipelines — npm install -g @kibibot/cli
OpenAI-compatible AI model access billed to your Kibi Credits
# Agent API base URL
https://api.kibi.bot/agent/v1
# LLM Gateway base URL
https://llm.kibi.bot
# Auth header (all requests)
X-Api-Key: kb_...
Quick Start
Two ways to get started — pick what fits your workflow.
Before you start — get an API key
Go to kibi.bot/settings/api-keys → Create API Key → name it → copy the kb_... key.
Enable Kibi LLM Gateway if you need AI model access. Enable Agent Reload if you want the agent to top up credits from your trading wallet.
Best for AI agent users (OpenClaw, etc.). The agent learns KibiBot's full API automatically.
Tell your agent:
Then hand it your API key and start giving commands in plain language.
View SKILL.mdBest for humans, scripts, and CI pipelines.
npm install -g @kibibot/cli
kibi login # enter your API key
kibi whoami # verify connection
kibi token create # deploy your first tokenAll commands support --json for scripting.
CLI Reference
The @kibibot/cli package provides a kibi binary for humans and CI/CD pipelines. All commands support --json for machine-readable output.
Installation & Auth
npm install -g @kibibot/cli
# Authenticate
kibi login # prompts for API key
kibi logout # clear stored key
kibi whoami # show current identityToken Commands
# Create a token (interactive prompts if flags omitted)
kibi token create \
--name "Moon Token" \
--symbol MOON \
--chain base \
--description "To the moon" \
--image-url https://example.com/moon.png
# Wait for deployment (default: polls until complete)
# Use --no-wait to return job ID immediately
# Get token info
kibi token info 0xABC123... --chain base
# Check job status
kibi status 12345
# List tokens you've created
kibi tokens createdBalance & Quota
# Show wallet balances across all chains
kibi balances
# Show daily token creation quota per chain
kibi quotaKibi Credits & LLM
# Check Kibi Credit balance + agent reload config
kibi llm credits
# List available AI models
kibi llm models
# Reload Kibi Credits from trading wallet
kibi llm reload
# Emergency disable agent reload
kibi llm reload --disable
# Generate provider config for OpenClaw / Cursor / Claude
kibi llm setup openclaw
kibi llm setup cursor
kibi llm setup claudeOther Commands
# List all agent capabilities
kibi skills
# Config management
kibi config get # show all config
kibi config set apiKey kb_...
kibi config set apiUrl https://api.kibi.bot
kibi config set llmUrl https://llm.kibi.bot
# Global flags (work on any command)
kibi <command> --json # machine-readable JSON output
kibi <command> --debug # verbose request/response logging
kibi --versionAgent API Reference
Base URL: https://api.kibi.bot/agent/v1 — Auth: X-Api-Key: kb_... header on all requests.
Identity
Token Creation
Quota
Balances
Kibi LLM Gateway
The Kibi LLM Gateway is an OpenAI-compatible proxy billed to your Kibi Credits. Use the same kb_... API key — no separate account needed.
Base URL: https://llm.kibi.bot · Auth: X-Api-Key: kb_... or Authorization: Bearer kb_...
Supported Models
| Model ID | Provider | Context | Format |
|---|---|---|---|
| claude-haiku-4-5 | Anthropic | 200k | Anthropic + OpenAI |
| claude-sonnet-4-6 | Anthropic | 200k | Anthropic + OpenAI |
| claude-opus-4-6 | Anthropic | 200k | Anthropic + OpenAI |
| gpt-4o | OpenAI | 128k | OpenAI |
| gpt-4o-mini | OpenAI | 128k | OpenAI |
| gemini-2.5-flash | 1M | OpenAI | |
| gemini-2.5-pro | 1M | OpenAI |
OpenAI-compatible (all models)
curl https://llm.kibi.bot/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-Api-Key: kb_YOUR_KEY" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 256
}'Anthropic-compatible (Claude only)
curl https://llm.kibi.bot/v1/messages \
-H "Content-Type: application/json" \
-H "X-Api-Key: kb_YOUR_KEY" \
-d '{
"model": "claude-haiku-4-5",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 256
}'Other endpoints
GET /v1/models # list all models
GET /v1/models/openclaw # ready-to-paste OpenClaw config (no auth)Setup OpenClaw with Kibi LLM Gateway
Use Kibi as your OpenClaw agent's AI model provider — billed to your Kibi Credits instead of paying Anthropic/OpenAI directly. Also install the KibiBot skill so the agent can create tokens, check balances, and more.
Step 1 — Install the KibiBot skill
Ask your agent:
install the kibibot skill from https://github.com/KibiAgent/skills/tree/main/kibibotOr browse the skill source: github.com/KibiAgent/skills
Step 2 — Add provider to openclaw.json
File: ~/.openclaw/openclaw.json
{
"models": {
"mode": "merge",
"providers": {
"kibi": {
"baseUrl": "https://llm.kibi.bot",
"apiKey": "kb_YOUR_KEY",
"api": "openai-completions",
"models": [
{ "id": "claude-haiku-4-5", "name": "Claude Haiku (KibiBot)", "api": "anthropic-messages", "contextWindow": 200000, "maxTokens": 4096 },
{ "id": "claude-sonnet-4-6", "name": "Claude Sonnet (KibiBot)", "api": "anthropic-messages", "contextWindow": 200000, "maxTokens": 8192 },
{ "id": "gpt-4o", "name": "GPT-4o (KibiBot)", "contextWindow": 128000, "maxTokens": 16384 },
{ "id": "gemini-2.0-flash", "name": "Gemini 2.0 Flash (KibiBot)", "contextWindow": 1048576, "maxTokens": 8192 }
]
}
}
}
}Or run kibi llm setup openclaw to generate this automatically.
Step 3 — Set as default model (optional)
{
"agents": {
"defaults": {
"model": { "primary": "kibi/claude-sonnet-4-6" }
}
}
}Step 4 — Restart and verify
openclaw gateway restart
# Ask your agent:
# "what's my KibiBot Kibi Credit balance?"Reload Kibi Credits with Agent
Agent Reload lets your agent top up its own Kibi Credits directly from your trading wallet USDC/USDT — without any human interaction.
This is a manual trigger — your agent decides when to call it. There is no background auto-reload watcher.
Setup (one-time, human)
- Go to kibi.bot/credits → Agent Reload section → enable it, set amount and daily limit.
- Go to kibi.bot/settings/api-keys → Edit Permissions on your key → enable Kibi LLM Gateway and Agent Reload.
How it works
Example flow
# Check balance first
curl https://api.kibi.bot/agent/v1/balance/credits \
-H "X-Api-Key: kb_YOUR_KEY"
# If low, reload
curl -X POST https://api.kibi.bot/agent/v1/balance/credits/reload \
-H "X-Api-Key: kb_YOUR_KEY"
# Emergency stop (if agent misbehaves)
curl -X POST https://api.kibi.bot/agent/v1/balance/credits/reload/disable \
-H "X-Api-Key: kb_YOUR_KEY"Errors
| Parameter | Type | Required | Description |
|---|---|---|---|
| 403 | No | Reload not enabled for user or this API key | |
| 429 | No | Daily reload limit would be exceeded | |
| 400 | No | Insufficient USDC/USDT on all configured chains | |
| 500 | No | On-chain transaction failed |
Error Codes
All errors return JSON with a detail field describing what went wrong.
| Code | Meaning | Common cause |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key. Check kibi.bot/settings/api-keys. |
| 402 | Payment Required | Insufficient Kibi Credits (LLM) or trading wallet balance (token creation). |
| 403 | Forbidden | Feature not enabled for this key or user — check key permissions. |
| 404 | Not Found | Resource doesn't exist or belongs to another user. |
| 422 | Validation Error | Invalid request body — check required fields and value constraints. |
| 429 | Too Many Requests | Rate limited or daily cap exceeded. Wait and retry. |
| 500 | Internal Server Error | Server-side failure — usually safe to retry after a short delay. |