Install
openclaw skills install @jlacroix82/api-proxySmart proxy for external API calls with retry, caching, rate limiting, and fallback providers. Key management with masked display. Zero external dependencies.
openclaw skills install @jlacroix82/api-proxyStop duplicating API logic. Start routing through one smart gateway.
Every agent call to an external API needs its own retry logic, caching, rate limit handling, and key management. That's the same code repeated across every skill.
API Gateway centralizes all of that into one tool.
node skills/api-gateway/api-gateway.js --call openai https://api.openai.com/v1/chat/completions '{"model":"gpt-4","messages":[{"role":"user","content":"hello"}]}'
Automatically retries up to 3 times with exponential backoff, caches responses for 5 minutes.
node skills/api-gateway/api-gateway.js --call --dry-run openai https://api.openai.com/v1/chat/completions
# List configured keys (masked)
node skills/api-gateway/api-gateway.js --keys
# Add a key
node skills/api-gateway/api-gateway.js --keys add openai sk-abc123
# Remove a key
node skills/api-gateway/api-gateway.js --keys remove openai
# Show cache entries
node skills/api-gateway/api-gateway.js --cache
# Clear cache
node skills/api-gateway/api-gateway.js --cache --clear
node skills/api-gateway/api-gateway.js --rate openai
node skills/api-gateway/api-gateway.js --fallback openai anthropic
If the primary provider fails or is rate-limited, automatically tries the fallback.
node skills/api-gateway/api-gateway.js --status
node skills/api-gateway/api-gateway.js --circuit --status
node skills/api-gateway/api-gateway.js --circuit <provider> --reset
x-ratelimit-remaining headers--ratememory/api-gateway/keys.json--circuit --status + --circuit <name> --resetData files stored in: memory/api-gateway/
keys.json — API key storagefallbacks.json — Fallback provider mappingscache.json — Response cacherate-limits.json — Rate limit trackingrequest-log.json — Request history (last 1000)circuit-state.json — Circuit breaker state per providerOverride data directory:
--dir /path/to/data
When making API calls:
--call <provider> <endpoint> [body] instead of direct fetch--keys add before first use--fallback primary secondary for critical providers--cache during heartbeats to monitor usage--call --dry-run before executing important calls| Approach | Retry | Cache | Rate Limit | Fallback |
|---|---|---|---|---|
| Manual fetch | ❌ | ❌ | ❌ | ❌ |
| Custom wrapper | ⚠️ | ⚠️ | ⚠️ | ❌ |
| API Gateway | ✅ | ✅ | ✅ | ✅ |
API Gateway gives you retry + caching + rate limiting + fallback in one call.