Issue authentication keys with spending caps
Project description
Budget per-agent, per-provider, as little or as much as you want
$ uvx capit openrouter 5.00 --agent openclaw -y
$5.00 openrouter key installed into openclaw
That's it. Openclaw now has a capped API key. If it goes rogue, it can only cost you $5.
Install
uvx install capit
Usage
Give an agent a budget
# Claude Code - $5 cap
capit openrouter 5.00 --agent claude -y
# Cursor - $10 cap
capit openrouter 10.00 --agent cursor -y
# Windsurf - $5 cap
capit openrouter 5.00 --agent windsurf -y
# OpenClaw - $5 cap
capit openrouter 5.00 --agent openclaw -y
Each agent gets its own capped key. Sleep soundly.
More agents
capit --consumers # List all supported agents
See consumers/README.md for the full list and adding custom agents.
First time?
capit openrouter 5.00 --agent claude -i -y
The -i flag prompts for your OpenRouter management key once. It's used to create the capped key, then discarded.
Platforms
The included platforms are openrouter and unkey.
Platforms are easy to create with a claude skill located in skills/platform-creator.md.
See platforms/README.md for more details.
Administration
capit --keys list # Your master keys
capit --keys list -r openrouter # Capped keys created on OpenRouter
capit --keys delete openrouter <id> # Revoke a key
capit --platforms # Available platforms
capit --consumers # Supported agents
How It Works
- You run
capit openrouter 5.00 --agent claude -y - capit calls OpenRouter's API
- capit creates a guardrail with $5 cap
- capit creates an API key with that guardrail
- capit writes the key to
~/.claude/.credentials.json - Done
The cap is enforced by OpenRouter. The key literally cannot spend more than $5.
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capit-0.3.0.tar.gz.
File metadata
- Download URL: capit-0.3.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98842d5d819267cb67862f477fd595ed09faa2489abdc23c9599c42c6497795
|
|
| MD5 |
acf3c3da30f0d90c7e0a2a2878622d54
|
|
| BLAKE2b-256 |
02246479264a5acfe50c67809402cc5b833bf4b10d1a028158a028734754a2a6
|
File details
Details for the file capit-0.3.0-py3-none-any.whl.
File metadata
- Download URL: capit-0.3.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a9c0e54b8a404f6990cfe7767f8da631c0b10085e3c2ee8a04113b9b0b99216
|
|
| MD5 |
a891082a9e2d7eb75e27b65a8e9a7d55
|
|
| BLAKE2b-256 |
0627a572ba779fa980fb263c3940e682b2edc531be68319721a00bdfa9c41d7b
|