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.
curl https://api.electronhub.ai/v1/auth/proxy/validate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ek-proxy-1234567890abcdef" \
-d '{
"model": "gpt-4o"
}'
Valid Access
Invalid Model
IP Restricted
Expired Key
{
"valid" : true ,
"message" : "Access granted"
}
Overview
Validate whether a proxy key can access a specific model from the current IP address. This endpoint is useful for pre-flight checks before making API requests, especially in applications that need to handle access restrictions gracefully.
Proxy Key Only : This endpoint only works with proxy keys (starting with ek-proxy-). Regular API keys will receive a 400 error.
Request Body
The model ID to validate access for. If omitted, validates general proxy key access without model-specific checks.
Response Fields
Whether the proxy key has valid access (true) or is restricted (false)
Human-readable explanation of the validation result
Use Cases
Pre-flight Checks Validate access before making expensive API calls
User Experience Show users which models they can access
Error Prevention Avoid authentication errors in production workflows
Access Auditing Log and monitor access patterns and restrictions
Error Codes
Bad Request - Not a proxy key or invalid request format
Unauthorized - Invalid proxy key
Rate Limited - Too many validation requests
Enter your API key (starts with 'ek-')
Model to validate access for