Create Proxy Key
Create a new proxy key with specified permissions and limits
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 expiration
Credit amount to allocate to this proxy key (must be positive)
List of model IDs this key can access. Leave empty to allow all models
Examples: ["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 IPs
Examples: ["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
Response
Proxy key created successfully
The response is of type object
.