IP Whitelisting
IP whitelisting adds an extra layer of security by restricting API key usage to specific IP addresses or ranges.
Configuring IP Whitelisting
- Go to API Keys and edit the key
- Enable IP Whitelisting
- Add one or more IP addresses or CIDR ranges
- Save the key
Supported Formats
| Format | Example | Description |
|---|---|---|
| Single IPv4 | 203.0.113.50 | Exact IP match |
| IPv4 CIDR | 203.0.113.0/24 | Range: 203.0.113.0 - 203.0.113.255 |
| Single IPv6 | 2001:db8::1 | Exact IPv6 match |
| IPv6 CIDR | 2001:db8::/32 | IPv6 range |
Behavior
- When IP whitelisting is disabled (default), the key works from any IP address
- When enabled, only requests from whitelisted IPs are accepted
- Requests from non-whitelisted IPs receive a
403error with codeip_not_whitelisted - The request IP is logged for security auditing
Finding Your IP
To find the IP address of your server or AI agent service:
# From the server where your agent runs:
curl -s https://api.ipify.org
Cloud Service IPs
If your AI agent runs on a cloud service, you may need to whitelist a range of IPs. Check your provider's documentation for their IP ranges. Note that some cloud functions use dynamic IPs — in those cases, IP whitelisting may not be practical.