API Credits Lite for Openclaw

A visual API credit monitoring tool that tracks LLM provider balances with gaming-inspired health bars and automated sync capabilities.

franciscobuiltdat
v1.0.2
Feb 24, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install api-credits-lite

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install api-credits-lite using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is API Credits Lite?

API Credits Lite is a specialized utility designed for AI agents and developers to manage their spending across five major LLM providers: Anthropic, OpenAI, OpenRouter, Mistral, and Groq. Instead of manually checking multiple billing consoles, this skill provides a unified view of your remaining credits through intuitive, color-coded health bars. It is a lightweight yet powerful addition to the library of Openclaw Skills, ensuring that your automated workflows are never interrupted by unexpected credit exhaustion.

API Credits Lite Use Cases

  • Checking real-time balance status for Anthropic, OpenAI, OpenRouter, Mistral, and Groq.
  • Manually syncing credit balances after adding funds to a provider account.
  • Automating credit checks via API for providers that support billing endpoints.
  • Visualizing credit depletion levels to identify when a top-up is required.
  • Recording specific top-up amounts to maintain an accurate local balance history.

How API Credits Lite Works

  1. The AI agent triggers specific Python scripts located in the skill's scripts directory based on user intent.
  2. For manual updates, the skill modifies the local configuration file to reflect the user's reported balance and maximum credit limit.
  3. For automated checks, the skill utilizes environment variables to authenticate with provider APIs (OpenAI, OpenRouter, or Vercel) and fetch the current usage data.
  4. The system calculates the remaining credit percentage relative to the set maximum.
  5. A visual report is generated using color-coded ASCII health bars (Green for >75%, Yellow for 50-75%, Orange for 25-50%, and Red for <25%) to provide instant status awareness.

API Credits Lite Setup

To integrate this tool into your environment, follow these configuration steps for your Openclaw Skills:

  1. Ensure the skill is located in your workspace and navigate to its root:
cd ~/.openclaw/workspace/skills/api-credits-lite/
  1. Create your configuration file from the provided example:
cp config.example.json config.json
  1. (Optional) Set up environment variables for providers that support automated balance checking:
export OPENAI_API_KEY='your_key_here'
export OPENROUTER_API_KEY='your_key_here'
export VERCEL_AI_GATEWAY_KEY='your_key_here'
  1. Run an initial manual sync to set your starting balances:
python3 scripts/sync_provider.py anthropic 25.00 50.00

API Credits Lite Data Schema & Taxonomy

The skill manages its state within a config.json file. The data is organized into a provider-centric taxonomy:

Attribute Description
provider The name of the AI service (e.g., openai, mistral, groq).
balance The current available credit in USD.
max_credits The threshold used to define a 'full' health bar for percentage calculations.
last_check The timestamp of the last successful API pull or manual update.
status_color Derived value based on the percentage of balance remaining.

API Credits Lite Advanced Features

  • Video game-style visual health bars for immediate credit status interpretation.
  • Automated API polling for OpenAI, OpenRouter, and Vercel AI Gateway integrations.
  • Manual sync overrides for providers without public billing APIs, such as Anthropic and Groq.
  • Top-up recording feature to increment balances without manually recalculating totals.
  • Minimalist dependency footprint optimized for fast execution within Openclaw Skills environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*