Overview
Create a new proxy key with customized access controls and spending limits. Proxy keys allow you to delegate API access with fine-grained permissions, making them perfect for team collaboration, application isolation, and budget management.Request Body
Human-readable name for the proxy key (max 25 characters)
Expiration timestamp in seconds since Unix epoch. Use
-1 for no expirationCredit amount to allocate to this proxy key (must be positive)
List of model IDs this key can access. Leave empty to allow all modelsExamples:
["gpt-4o", "claude-3-5-sonnet-20241022", "dall-e-3"]List of IP addresses or CIDR blocks allowed to use this key. Leave empty to allow all IPsExamples:
["192.168.1.100", "10.0.0.0/8", "203.0.113.0/24"]Limitations by Tier
The number of proxy keys you can create depends on your subscription tier:- Free (Tier 0): 10 keys
- Basic (Tier 1): 15 keys
- Standard (Tier 2): 30 keys
- Pro (Tier 3): 50 keys
- Enterprise (Tier 4): 100 keys
Validation Rules
Credit Allocation: The
allocated_ammount cannot exceed your daily credit limit.IP Format: IP addresses must be valid IPv4/IPv6 addresses or CIDR notation (e.g.,
192.168.1.0/24).Expiration: If set,
expires_at must be in the future. Use -1 for keys that never expire.Use Cases
Team Collaboration
Create separate keys for team members with different access levels
Environment Isolation
Use different keys for development, staging, and production
Budget Control
Set spending limits per application or project
Security Compliance
Restrict access by IP address and model selection
Error Codes
Bad Request - Invalid input data (see error message for details)
Unauthorized - Invalid or missing API key
Forbidden - Exceeded proxy key limit for your tier
Rate Limited - Too many requests, please slow down
Authorizations
Enter your API key (starts with 'ek-')
Body
application/json
Name of the proxy key
Maximum length:
25Example:
"My API Key"
Expiration timestamp in seconds (-1 for no expiration)
Example:
1735689600
Allocated credit amount
Required range:
x >= 0Example:
10
List of allowed models (empty for all models)
Example:
["gpt-4o", "claude-3-5-sonnet-20241022"]List of allowed IP addresses or CIDR blocks (empty for all IPs)
Example:
["192.168.1.0/24", "203.0.113.42"]Response
201 - application/json
Proxy key created successfully
Name of the proxy key
Maximum length:
25Expiration timestamp (-1 for no expiration)
Allocated credit amount
Required range:
x >= 0List of allowed models
List of allowed IP addresses or CIDR blocks
Amount of credits used
Whether the proxy key is active
The proxy key value
Creation timestamp
Last usage timestamp
