API KEY SECURITY FOR AI AGENTS

Your agents don't need your real
keys

RubberAPI proxies your OpenRouter calls so your AI agents never touch your API key. Spend limits. IP locking. Instant revocation. Two env vars to set up.

This is how you deploy agents today

Be honest. This is sitting on a VPS somewhere right now.

.env
# .env on your OpenClaw VPS
OPENROUTER_API_KEY=sk-or-v1-real-key-with-unlimited-access
# no spend limit
# no expiry
# no audit trail
# no way to revoke without rotating for everything
# one prompt injection away from a $10,000 bill
๐Ÿ’ฅ
No spend cap. A rogue agent loop burns through your entire OpenRouter balance overnight while you sleep.
๐Ÿ‘ป
No visibility. Which agent called what model, when, and how much it cost? You have no idea.
๐Ÿ”’
No isolation. Kill one agent's access? You can't. It's the same key everywhere.
๐ŸŽฏ
One breach = game over. VPS compromised? Attacker has your key with full, permanent, unlimited access.

Fix it in three steps

1

Push your key through RubberAPI

From your local machine, create a scoped proxy key with the constraints you want.

$ rubberapi push "sk-or-v1-your-real-key" \
    --daily-limit 5.00 \
    --models "claude-sonnet,claude-haiku" \
    --inactive-expiry 7d

โœ… Proxy key created
Key: rk_live_a8f3k2x9...
Endpoint: https://rubberapi.fly.dev/v1
Budget: $5.00/day
Models: claude-sonnet, claude-haiku
2

Paste two env vars into your VPS

Drop-in replacement. Zero code changes. Works with OpenClaw, LangChain, CrewAI, or anything OpenAI-compatible.

# Before (raw key on VPS โ€” terrifying)
OPENROUTER_API_KEY=sk-or-v1-your-real-key
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1

# After (proxy key โ€” your real key never touches the VPS)
OPENROUTER_API_KEY=rk_live_a8f3k2x9
OPENROUTER_BASE_URL=https://rubberapi.fly.dev/v1
3

Sleep peacefully

Your agent runs normally. RubberAPI handles auth, enforces limits, and logs everything. Your real key never leaves the proxy.

$ rubberapi status rk_live_a8f3k2x9

Status: Active
IP locked: 142.93.xx.xx (auto-pinned on first use)
Spent: $2.34 / $5.00 today
Requests: 47 today
Top model: claude-sonnet (94%)
Last used: 3 minutes ago

# Something wrong? One command.
$ rubberapi kill rk_live_a8f3k2x9
โŒ Key revoked. All requests will be denied immediately.

Six layers of protection

None of them require your agents to change a single line of code.

๐ŸŒ

IP Lock on First Use

Proxy key auto-binds to the first IP that uses it. Stolen key from a different machine? Useless. Reset anytime with rubberapi repin.

๐Ÿ’ฐ

Daily Spend Limits

Cap how much any proxy key can spend per day. Resets midnight UTC. Hit the limit? Requests are denied until tomorrow. No surprise bills.

๐Ÿค–

Model Allowlist

Restrict which models agents can call. Let your summarizer use Haiku but block it from burning money on Opus. Per-key model control.

๐ŸŒฑ

Inactivity Auto-Expiry

Forgot about a proxy key? It auto-revokes after N days of no use. No more zombie keys on abandoned VPS instances.

โœ๏ธ

Instant Kill Switch

One command from your phone, laptop, anywhere. rubberapi kill โ€” key is dead, all requests denied immediately. No key rotation needed.

๐Ÿ“‹

Full Audit Trail

Every request logged: which proxy key, which model, input/output tokens, cost, source IP, timestamp. Know exactly what happened.

What changes. What doesn't.

Raw Key on VPSWith RubberAPI
API key on machineYour real keyDisposable proxy key
VPS compromisedUnlimited access foreverCapped, IP-locked, killable
Spend controlNoneDaily + lifetime caps
Revoke one agentRotate key everywhereKill one key, others unaffected
Audit trailNoneEvery request logged
Code changes neededโ€”Two env vars

What happens when things go wrong

Because they will. The question is how bad it gets.

>_VPS is compromised

Without RubberAPI

Attacker has your real API key. Unlimited spend. No expiry. You don't know until the bill arrives.

With RubberAPI

Attacker has a proxy key that's IP-locked to the VPS, capped at $5/day, and you kill it the moment you notice.

๐Ÿ’ฌAgent enters infinite loop

Without RubberAPI

Agent burns through your entire balance calling Opus in a tight loop. You wake up to a $2,000 bill.

With RubberAPI

Agent hits the $5 daily limit after a few minutes. Requests denied. You get a webhook alert. Damage: $5.

๐ŸงŸForgotten deployment

Without RubberAPI

That test VPS you forgot about 3 months ago still has your key. Anyone who finds it has permanent access.

With RubberAPI

Proxy key auto-expired after 7 days of inactivity. The key is dead. Nothing to exploit.

โœ๏ธPrompt injection

Without RubberAPI

Malicious input tricks your agent into exfiltrating the API key via a crafted response or tool call.

With RubberAPI

Agent only has the proxy key. Even if exfiltrated, it's IP-locked, spend-capped, and killable in one command.

Simple, transparent pricing

Start free. Scale when you need to.

Free

$0/ month

1 proxy key

  • โœ“IP lock on first use
  • โœ“Daily spend limits
  • โœ“Model allowlist
  • โœ“Inactivity auto-expiry
  • โœ“Instant kill switch
  • โœ“7-day audit log
  • โœ“Community support
Get Started Free
Most Popular

Pro

$19/ month

10 proxy keys

  • โœ“Everything in Free
  • โœ“90-day audit log
  • โœ“Webhook budget alerts
  • โœ“Priority email support
Get Started

Enterprise

Custom

Unlimited keys

  • โœ“Everything in Pro
  • โœ“Trusted Execution EnvironmentTEE with image hash verifiability
  • โœ“Shamir Secret Sharing (3-of-N)No single point of key exploit
  • โœ“Anomaly detection on API usage
  • โœ“Google, Slack, Stripe + moreProtect any API key, not just OpenRouter
  • โœ“SLA guarantee
  • โœ“Dedicated support
Contact Us

Stop gambling with your API keys

Set up in 60 seconds. Your agents won't notice the difference โ€” but your wallet will.