Skip to main content

verify_api_key

Function verify_api_key 

Source
pub async fn verify_api_key(
    __arg0: State<UnifiedAppState>,
    __arg1: Json<VerifyApiKeyRequest>,
) -> Result<impl IntoResponse, StatusCode>
Expand description

POST /api-keys/verify — verify an API key by calling the provider’s API.

  • For OpenRouter: Calls GET https://openrouter.ai/api/v1/key
  • For HuggingFace: Calls GET https://huggingface.co/api/whoami