GET
/
auth
/
proxy
curl https://api.electronhub.ai/v1/auth/proxy \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY"
[
  {
    "name": "Production API Key",
    "key": "ek-proxy-1234567890abcdef",
    "expires_at": 1735689600,
    "allocated_ammount": 100.0,
    "used_ammount": 25.5,
    "is_active": true,
    "model_whitelist": ["gpt-4o", "claude-3-5-sonnet-20241022"],
    "ip_whitelist": ["192.168.1.0/24"],
    "created_at": 1704067200,
    "last_used": 1704153600
  },
  {
    "name": "Development Key",
    "key": "ek-proxy-abcdef1234567890",
    "expires_at": -1,
    "allocated_ammount": 10.0,
    "used_ammount": 2.1,
    "is_active": true,
    "model_whitelist": [],
    "ip_whitelist": [],
    "created_at": 1704067200,
    "last_used": 1704139200
  }
]
curl https://api.electronhub.ai/v1/auth/proxy \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY"
[
  {
    "name": "Production API Key",
    "key": "ek-proxy-1234567890abcdef",
    "expires_at": 1735689600,
    "allocated_ammount": 100.0,
    "used_ammount": 25.5,
    "is_active": true,
    "model_whitelist": ["gpt-4o", "claude-3-5-sonnet-20241022"],
    "ip_whitelist": ["192.168.1.0/24"],
    "created_at": 1704067200,
    "last_used": 1704153600
  },
  {
    "name": "Development Key",
    "key": "ek-proxy-abcdef1234567890",
    "expires_at": -1,
    "allocated_ammount": 10.0,
    "used_ammount": 2.1,
    "is_active": true,
    "model_whitelist": [],
    "ip_whitelist": [],
    "created_at": 1704067200,
    "last_used": 1704139200
  }
]

Overview

The List Proxy Keys endpoint allows you to retrieve all proxy keys associated with your account. Proxy keys are sub-keys that allow you to share access to the API with specific limitations and restrictions.

Use Cases

  • Team Management: Create separate keys for different team members with specific access controls
  • Application Isolation: Use different keys for different applications or environments
  • Budget Control: Set spending limits per key to control costs
  • Security: Restrict access by IP address and model selection

Response Fields

name
string
The human-readable name of the proxy key
key
string
The actual proxy key value (starts with ek-proxy-)
expires_at
integer
Expiration timestamp in seconds since Unix epoch. -1 means no expiration
allocated_ammount
number
Total credit amount allocated to this proxy key
used_ammount
number
Amount of credits already used by this proxy key
is_active
boolean
Whether the proxy key is currently active and can be used
model_whitelist
array
List of model IDs this key can access. Empty array means all models are allowed
ip_whitelist
array
List of IP addresses or CIDR blocks allowed to use this key. Empty array means all IPs are allowed
created_at
integer
Timestamp when the proxy key was created
last_used
integer
Timestamp when the proxy key was last used for an API request

Error Handling

401
error
Unauthorized - Invalid or missing API key
403
error
Forbidden - API key doesn’t have permission to access proxy keys
429
error
Rate Limited - Too many requests, please slow down

Authorizations

Authorization
string
header
required

Enter your API key (starts with 'ek-')

Response

200 - application/json

Success

The response is of type object[].