Proxy Keys
Update Proxy Key
Update an existing proxy key’s configuration
POST
Update the configuration of a proxy key you own. The proxy key to update is now identified by the
proxy_key field in the request body so the URL is static and can be exact-matched at the edge (Cloudflare, etc.), making it immune to path-traversal-append DDoS abuse.
The legacy POST /v1/auth/proxy/update/{proxy_key} still works for backward compatibility but is discouraged for new integrations.
Request Body
The proxy key to update (starts with
ek-proxy-). Must be a string between 1 and 256 characters and must be a proxy key you own — cross-account updates return 403 Forbidden.Updated human-readable name for the proxy key (max 25 characters).
New expiration timestamp in seconds since Unix epoch. Use
-1 for no expiration.New credit amount to allocate to this proxy key. Must be positive and cannot exceed your tier’s per-key cap (default $10,000).
Spend window for the allocation. One of
"daily", "weekly", or "monthly".Updated list of model IDs this key can access. Leave empty or omit to allow all models.
Updated list of IP addresses or CIDR blocks allowed to use this key. Leave empty or omit to allow all IPs.
Important Notes
Usage Preservation:
used_ammount is preserved across updates — 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 — missing, malformed, or invalid
Authorization header. JWT tokens are not accepted on this endpoint.Forbidden — the proxy key exists but is owned by a different account.
Not Found — no proxy key with that value exists.
Unprocessable Entity — the request body is missing
proxy_key or any required field, or violates the length constraint (1 <= len(proxy_key) <= 256).Rate Limited — too many requests, please slow down.
Notes
- Requires an API key (
ek-...) in theAuthorizationheader. JWT tokens are intentionally rejected. - Proxy keys themselves (
ek-proxy-...) cannot call this endpoint — only the parent account that owns the proxy key can update it.
Authorizations
Enter your API key (starts with 'ek-')
Body
application/json
The proxy key to update (must be one you own)
Required string length:
1 - 256Example:
"ek-proxy-1234567890abcdef"
Name of the proxy key
Maximum string length:
25Example:
"Updated API Key"
Expiration timestamp in seconds (-1 for no expiration)
Example:
1735689600
Allocated credit amount
Required range:
x >= 0Example:
15
Spend window for the allocation
Available options:
daily, weekly, monthly 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
Proxy key updated successfully
Example:
"Proxy key updated"
