Function update_api_key

Source
pub async fn update_api_key(
    base_url: &str,
    api_key: &str,
    hash: &str,
    name: Option<String>,
    disabled: Option<bool>,
    limit: Option<f64>,
) -> Result<ApiKey, OpenRouterError>
Expand description

Updates an existing API key. Requires a Provisioning API key.

§Arguments

  • base_url - The base URL of the OpenRouter API.
  • api_key - The API key for authentication.
  • hash - The hash of the API key to update.
  • name - Optional new display name for the API key.
  • disabled - Optional flag to disable the API key.
  • limit - Optional new credit limit for the API key.

§Returns

  • Result<ApiKey, OpenRouterError> - The updated API key.