Function get_current_api_key

Source
pub async fn get_current_api_key(
    base_url: &str,
    api_key: &str,
) -> Result<ApiKeyDetails, OpenRouterError>
Expand description

Get information on the API key associated with the current authentication session

§Arguments

  • base_url - The base URL of the OpenRouter API.
  • api_key - The API key for authentication.

§Returns

  • Result<ApiKeyDetails, OpenRouterError> - The details of the current API key.