Overview
Update the configuration of an existing proxy key. You can modify all settings including name, expiration, credit allocation, and access restrictions. This is useful for adjusting permissions as project requirements change.Path Parameters
The proxy key ID to update (starts with
ek-proxy-)Request Body
Updated human-readable name for the proxy key (max 25 characters)
New expiration timestamp in seconds since Unix epoch. Use
-1 for no expirationNew credit amount to allocate to this proxy key (must be positive)
Updated list of model IDs this key can access. Leave empty to allow all models
Updated list of IP addresses or CIDR blocks allowed to use this key. Leave empty to allow all IPs
Important Notes
Credit Changes: When increasing
allocated_ammount, the difference is deducted from your account. When decreasing, unused credits are returned.Active Requests: Changes take effect immediately. Any ongoing requests with the proxy key will continue with the old settings.
Usage Preservation: The
used_ammount is preserved when updating. Only the allocation limit changes.Common Update Scenarios
Extend Expiration Date
Extend Expiration Date
Increase Credit Limit
Increase Credit Limit
Add Model Restrictions
Add Model Restrictions
Update IP Whitelist
Update IP Whitelist
Error Codes
Bad Request - Invalid input data or validation failed
Unauthorized - Invalid or missing API key
Forbidden - You don’t have permission to update this proxy key
Not Found - Proxy key doesn’t exist
Rate Limited - Too many requests, please slow down
Authorizations
Enter your API key (starts with 'ek-')
Path Parameters
Proxy key ID
Body
application/json
Name of the proxy key
Maximum length:
25Example:
"Updated API Key"
Expiration timestamp in seconds (-1 for no expiration)
Example:
1735689600
Allocated credit amount
Required range:
x >= 0Example:
15
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
200 - application/json
Proxy key updated successfully
Example:
"Proxy key updated"
