ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

bailian-usage-proxy

阿里百炼大模型平台的多人共享账号用量统计代理服务。用于解决公司共用阿里百炼账号时无法区分个人用量的问题。当用户需要:1) 部署阿里百炼用量统计代理,2) 统计多人Token用量和调用次数,3) 管理大模型API调用配额时激活此技能。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bjmfjoy/bailian-usage-proxy
Or

What This Skill Does

The bailian-usage-proxy is a critical utility for enterprise teams utilizing the Alibaba Bailian (DashScope) large language model platform. It acts as an intermediary layer between individual users and the centralized enterprise API key. By deploying this proxy, organizations can effectively monitor, attribute, and restrict AI usage at a granular level. The service intercepts OpenAI-compatible API requests, logs token consumption and call counts per user or department, enforces daily quota limits to prevent budget overruns, and provides a centralized management dashboard for cost analysis and reporting. It transforms a shared, anonymous API account into a controlled, multi-user resource.

Installation

To install this skill, run the following command in your terminal: clawhub install openclaw/skills/skills/bjmfjoy/bailian-usage-proxy.

After installation, follow these steps to configure your environment:

  1. Prepare the environment by cloning the source and installing dependencies via pip install -r requirements.txt.
  2. Configure your .env file by inputting your primary Alibaba Bailian API key and database connection strings.
  3. Initialize the persistence layer by executing python scripts/init_db.py.
  4. Start the proxy server using the provided docker-compose up -d for production or python -m app.main for local development.
  5. Provision individual access tokens for your team using python scripts/create_user.py to ensure every user has a unique identifier for tracking.

Use Cases

  • Enterprise Cost Attribution: Distribute API costs accurately across different departments (e.g., Engineering, Marketing, Product) based on verified usage logs.
  • Budget Control: Prevent "runaway" token usage by setting strict daily or weekly quotas for individual developers or test environments.
  • Regulatory Compliance: Maintain an audit trail of who accessed which LLM model and at what time, which is essential for sensitive enterprise deployments.
  • Development Workflow Integration: Seamlessly integrate the proxy into existing CI/CD pipelines or local development environments by simply updating the base_url to the proxy's endpoint.

Example Prompts

  1. "OpenClaw, can you check the usage statistics for the 'Algorithms' department for the last 7 days using the bailian-usage-proxy?"
  2. "Please generate a report of the top 5 users by token consumption for the current month and export it to a CSV file."
  3. "Set a new daily limit of 500,000 tokens for user 'Zhang San' to ensure we stay within our project budget."

Tips & Limitations

  • Performance: While the proxy adds a negligible latency overhead, ensure the server hosting the proxy has sufficient network bandwidth to handle concurrent requests.
  • Persistence: Regularly back up your database, as all historical usage data and user configurations are stored there.
  • Security: Treat the proxy's server as a sensitive internal asset. Ensure the management interface is protected behind a firewall or VPN, as it contains sensitive API usage data and administrative controls.
  • Compatibility: This skill only intercepts and proxies API requests that follow the standard OpenAI/DashScope compatible format.

Metadata

Author@bjmfjoy
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bjmfjoy-bailian-usage-proxy": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#alibaba#llm#proxy#token-tracking#api-management
Safety Score: 4/5

Flags: network-access, file-write, file-read, external-api