Skip to main content
POST
/
auth
/
proxy
/
lookup
curl https://api.electronhub.ai/v1/auth/proxy/lookup \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"proxy_key": "ek-proxy-1234567890abcdef"}'
{
  "name": "Production API Key",
  "key": "ek-proxy-1234567890abcdef",
  "user_id": "user_abc123",
  "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"],
  "enabled_thinking": true,
  "created_at": 1704067200,
  "last_used": 1704153600
}

Documentation Index

Fetch the complete documentation index at: https://docs.electronhub.ai/llms.txt

Use this file to discover all available pages before exploring further.

Returns the full metadata for one of your proxy keys, identified by the proxy_key field in the request body. This is the static-URL replacement for GET /v1/auth/proxy/{proxy_key}, designed so the URL can be exact-matched at the edge (Cloudflare, etc.) without being susceptible to path-traversal-append abuse. The legacy GET /v1/auth/proxy/{proxy_key} still works for backward compatibility but is discouraged for new integrations.
curl https://api.electronhub.ai/v1/auth/proxy/lookup \
  -H "Authorization: Bearer $ELECTRONHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"proxy_key": "ek-proxy-1234567890abcdef"}'
{
  "name": "Production API Key",
  "key": "ek-proxy-1234567890abcdef",
  "user_id": "user_abc123",
  "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"],
  "enabled_thinking": true,
  "created_at": 1704067200,
  "last_used": 1704153600
}

Request Body

proxy_key
string
required
The proxy key to look up. Must be a string between 1 and 256 characters and must be a proxy key you own — cross-account lookups return 403 Forbidden.

Response Fields

name
string
The human-readable name of the proxy key.
key
string
The proxy key value (starts with ek-proxy-).
user_id
string
The ID of the account that owns this proxy key.
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.
model_whitelist
array
Model IDs this key can access. Empty array means all models.
ip_whitelist
array
IPs or CIDR blocks allowed to use this key. Empty array means all IPs.
enabled_thinking
boolean
Whether extended-thinking models are allowed on this proxy key.
created_at
integer
Timestamp the proxy key was created.
last_used
integer
Timestamp the proxy key was last used.

Error Responses

401
error
Unauthorized — missing, malformed, or invalid Authorization header. JWT tokens are not accepted on this endpoint.
403
error
Forbidden — the proxy key exists but is owned by a different account.
404
error
Not Found — no proxy key with that value exists.
422
error
Unprocessable Entity — the request body is missing proxy_key or violates the length constraint (1 <= len <= 256).
429
error
Rate Limited — too many requests, please slow down.

Notes

  • Requires an API key (ek-...) in the Authorization header. JWT tokens are intentionally rejected.
  • Proxy keys themselves (ek-proxy-...) cannot call this endpoint — only the parent account that owns the proxy key can read its metadata.

Authorizations

Authorization
string
header
required

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

Body

application/json
proxy_key
string
required

The proxy key to look up / toggle / delete (must be one you own)

Required string length: 1 - 256
Example:

"ek-proxy-1234567890abcdef"

Response

Success

name
string
required

Name of the proxy key

Maximum string length: 25
expires_at
integer
required

Expiration timestamp (-1 for no expiration)

allocated_ammount
number
required

Allocated credit amount

Required range: x >= 0
model_whitelist
string[]

List of allowed models

ip_whitelist
string[]

List of allowed IP addresses or CIDR blocks

used_ammount
number
read-only

Amount of credits used

is_active
boolean
read-only

Whether the proxy key is active

key
string
read-only

The proxy key value

created_at
integer
read-only

Creation timestamp

last_used
integer
read-only

Last usage timestamp