Key security
LMU AI API key IP whitelist / blacklist guide: restrict which IPs can call your key to stop a leaked key being abused; supports single IPs and CIDR ranges.
If a key leaks, others can use it to consume your quota. An IP whitelist is the most direct protection — only IPs you trust are allowed to use the key.
Where to configure it
Go to console → API Keys → Edit (or Create) and find the two fields, IP whitelist and IP blacklist.
One rule per line, in either of two formats:
| Format | Example | Description |
|---|---|---|
| Single IP | 203.0.113.10 | Matches exactly one IP |
| CIDR range | 203.0.113.0/24 | Matches a whole range of IPs (/24 = 256 IPs) |
Both IPv4 and IPv6 are supported (IPv6 example: 2001:db8::/32).
How it takes effect
- Whitelist empty → no source restriction; any IP can use the key
- Whitelist non-empty → only IPs on the list can use it; all others are rejected
- Blacklist → matching IPs are rejected, taking priority over the whitelist
- You can use both at once (the blacklist is checked first, then the whitelist)
When rejected, the API returns 403 ACCESS_DENIED.
Find your real egress IP (important!)
This is the easiest mistake to make: the IP you configure on the key must be the public egress IP that LMU AI's servers see, not the private address shown by ipconfig / ifconfig on your computer.
# Command line
curl https://ifconfig.me
# or
curl https://ip.sbOr open ip.sb / ifconfig.me in your browser.
Your egress IP changes when you turn on a VPN or a company proxy, or when your mobile device switches Wi-Fi networks. Confirm it with the command above before configuring the whitelist.
Common scenarios
Scenario 1: A fixed office IP
Whitelist:
203.0.113.10Scenario 2: Working from both home and the office
Whitelist:
203.0.113.10 # Company egress
198.51.100.20 # Home broadbandScenario 3: Running on your own cloud server
Whitelist:
<your cloud server's public IP>Allow only your server to call the API, and use a separate key (with no whitelist) for local development.
Scenario 4: You just want to temporarily block a suspicious IP
Blacklist:
1.2.3.4Everything else works as usual, with no impact on normal use.
Troubleshooting
Q: My call returns 403 ACCESS_DENIED — is it an IP restriction?
Most likely. Check in order:
- Use
curl https://ifconfig.meto confirm your current real egress IP - Compare it against the key's whitelist to see if it matches
- If it doesn't match, add the current IP to the whitelist, or temporarily clear the whitelist to test
- If it's still rejected, check whether it's on the blacklist, whether the key is disabled, and whether the quota is exhausted
Q: I put an IP on the whitelist but I'm still rejected?
- Did you enter a private IP (
192.168.x.x/10.x.x.x/172.16-31.x.x)? Replace it with your public egress IP. - Did you enter an IPv6 address but go online over IPv4 (or vice versa)? Enter both.
- Did you enter a CIDR with a malformed format (such as
1.2.3.4/33)? Invalid rules are silently ignored.
Recommended practices
- For production keys, we strongly recommend configuring an IP whitelist to minimize the attack surface
- For development / debugging keys, you can skip the whitelist, but you must set a total quota cap as a backstop
- If you're especially worried about leaks, combine it with rate limiting, total quota, and model whitelist for layered defense
- The moment you suspect a key has leaked, reset or delete it in the console right away
Last updated:
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign upError Codes
LMU AI error-code reference: meanings and fixes for 401 / 403 / 404 / 429 / 5xx statuses, batch-image business codes, and lookup from raw error text to a fix.
Reliability architecture
LMU AI reliability architecture: multi-source routing, health probes, and three-tier automatic failover; 99.5% availability target on Standard and Enterprise.