Kibi

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.

Agent API

Create tokens, check quota, manage balances — REST endpoints at api.kibi.bot

CLI

Command-line tool for humans and CI pipelines — npm install -g @kibibot/cli

LLM Gateway

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.

Option A — Install Agent Skill

Best for AI agent users (OpenClaw, etc.). The agent learns KibiBot's full API automatically.

Tell your agent:

install the kibibot skill from https://github.com/KibiAgent/skills/tree/main/kibibot

Then hand it your API key and start giving commands in plain language.

View SKILL.md
Option B — Install CLI

Best for humans, scripts, and CI pipelines.

bash
npm install -g @kibibot/cli
kibi login        # enter your API key
kibi whoami       # verify connection
kibi token create # deploy your first token

All 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

bash
npm install -g @kibibot/cli

# Authenticate
kibi login                  # prompts for API key
kibi logout                 # clear stored key
kibi whoami                 # show current identity

Token Commands

bash
# 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 created

Balance & Quota

bash
# Show wallet balances across all chains
kibi balances

# Show daily token creation quota per chain
kibi quota

Kibi Credits & LLM

bash
# 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 claude

Other Commands

bash
# 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 --version

Agent 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 IDProviderContextFormat
claude-haiku-4-5Anthropic200kAnthropic + OpenAI
claude-sonnet-4-6Anthropic200kAnthropic + OpenAI
claude-opus-4-6Anthropic200kAnthropic + OpenAI
gpt-4oOpenAI128kOpenAI
gpt-4o-miniOpenAI128kOpenAI
gemini-2.5-flashGoogle1MOpenAI
gemini-2.5-proGoogle1MOpenAI

OpenAI-compatible (all models)

bash
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)

bash
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

bash
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:

bash
install the kibibot skill from https://github.com/KibiAgent/skills/tree/main/kibibot

Or browse the skill source: github.com/KibiAgent/skills

Step 2 — Add provider to openclaw.json

File: ~/.openclaw/openclaw.json

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)

json
{
  "agents": {
    "defaults": {
      "model": { "primary": "kibi/claude-sonnet-4-6" }
    }
  }
}

Step 4 — Restart and verify

bash
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)

  1. Go to kibi.bot/credits → Agent Reload section → enable it, set amount and daily limit.
  2. Go to kibi.bot/settings/api-keys → Edit Permissions on your key → enable Kibi LLM Gateway and Agent Reload.

How it works

1Agent calls POST /agent/v1/balance/credits/reload
2Backend checks key permission + user-level config
3Checks daily reload limit hasn't been hit
4Finds first configured chain with sufficient USDC/USDT in trading wallet
5Executes on-chain transfer from trading wallet → KibiBot treasury
6Credits Kibi Credit balance immediately
7Returns tx hash + new balance

Example flow

bash
# 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

ParameterTypeRequiredDescription
403NoReload not enabled for user or this API key
429NoDaily reload limit would be exceeded
400NoInsufficient USDC/USDT on all configured chains
500NoOn-chain transaction failed

Error Codes

All errors return JSON with a detail field describing what went wrong.

CodeMeaningCommon cause
401UnauthorizedMissing or invalid API key. Check kibi.bot/settings/api-keys.
402Payment RequiredInsufficient Kibi Credits (LLM) or trading wallet balance (token creation).
403ForbiddenFeature not enabled for this key or user — check key permissions.
404Not FoundResource doesn't exist or belongs to another user.
422Validation ErrorInvalid request body — check required fields and value constraints.
429Too Many RequestsRate limited or daily cap exceeded. Wait and retry.
500Internal Server ErrorServer-side failure — usually safe to retry after a short delay.
Agent Docs | Kibi.bot