Skip to main content

Key Health Monitoring

Clevername validates your stored API keys every 6 hours. If a provider rejects a key, or the check cannot reach the provider, the key is flagged on your dashboard so you can take action before it disrupts your agents.

Key Concepts

What is key health monitoring?

Key health monitoring is an automatic background check that verifies your stored API keys are still valid and functional. Every 6 hours, Clevername makes a lightweight validation call to each provider to confirm the key works. If a key fails validation, it is flagged on your dashboard.

What gets checked

The health check verifies one thing:

  • Authentication — does the provider accept the key on a lightweight validation call?

It does not inspect scopes, rate limits, or account standing. A check that cannot complete (network error, provider outage, key not present in the store) is reported separately from a rejected key.

Health statuses

ok

The provider accepted the key.

invalid

The provider rejected the key. Needs replacement.

error

The check could not complete (network error, provider outage, storage read failure). Usually transient.

not_stored

No key is stored for that provider, so there was nothing to check.

What Happens When a Key Fails Validation
1

Automatic check runs

Every 6 hours, the health check runs in the background. It makes a minimal API call to each provider (typically a models list endpoint) to verify the key is accepted. This call does not consume meaningful quota or generate costs.

2

Key is flagged

If the provider rejects the key, the key's health status is set to invalid. If the check itself fails — the provider is unreachable or the key cannot be read from the store — it is recorded as error. The status and last-checked timestamp are stored alongside the key metadata. Each background run validates up to 10 keys, cycling through the rest on later runs.

3

Dashboard shows the issue

Keys in invalid or error state appear with a warning badge on the API Keys settings page. There is no email or Slack notification for key health — check the page or trigger an on-demand check.

4

You take action

For invalid keys, you need to replace the key — either by sending a new one through the gateway (which triggers interception) or by updating it from the API Keys settings page. For error results, the cause is usually temporary and clears on the next check.

On-Demand Health Check

You do not have to wait for the scheduled check. You can trigger a health check at any time:

From the dashboard

Go to Dashboard → Settings → API Keys. Click the Check Health button next to any key. The result updates within a few seconds.

From the API

Call POST /hub/keys/health/check/{provider} (optionally with a label query parameter for multi-key providers). It is the same call the Check Health button makes and returns the status immediately. There is no MCP tool for health checks.

Tip
On-demand checks are not rate-limited by Clevername. The validation call is lightweight, but avoid hammering it in a loop so you do not trip the provider's own rate limits.

What Health Monitoring Does Not Do

Health monitoring is a validation tool, not an enforcement tool. It is important to understand the boundaries:

It doesIt does not
Flag invalid keys on the dashboardAutomatically disable agents using invalid keys
Distinguish a rejected key (invalid) from a failed check (error)Send email or Slack notifications
Record the last status and check time on the keyRotate, delete or replace keys without your action
Verify the provider accepts the keyCheck scopes, rate limits, billing balances or credit limits
Note
Health monitoring intentionally does not auto-disable agents. A key might temporarily fail validation due to a provider outage. Auto-disabling agents on transient failures would cause more disruption than the failure itself.