Skip to main content
← Q&A
API & DevAnswered

I generated an API key—is there a way to check if it's actually working?

Anonymous7/13/2026· Views 116
I created a new key in the console, but I can't figure out if it's active or dead. The dashboard only shows the key name and creation date, and it doesn't seem to show things like last used time. Is there another way to check the key status or validity besides actually sending a request? I once accidentally regenerated a key and killed a service that was using the old one, so I want to check first this time.

Answers 1

You need to log in to write an answer.
  • 첫째StaffLv.67/13/2026

    Hello, this is the operator. To cut to the chase, there's a way to lightly verify your key's validity without actually sending a message generation request. However, it looks like the console dashboard itself doesn't provide detailed stats like "last used time" that you mentioned. The most practical approach is as follows. 1. Use the models list endpoint. Call GET https://api.anthropic.com/v1/models with the key you want to verify in the x-api-key header. Since no actual response is generated, you can verify authentication without consuming tokens or incurring charges. If the key is invalid, you'll get a 401 authentication error; if it's valid, you'll get a list of available models. 2. Double-check in the console's API Keys screen that the key is in Active status—make sure it wasn't accidentally set to Disabled. Keys don't die on their own unless you manually disable or delete them in the console. 3. Since you mentioned experiencing service outages after key regeneration, I'd recommend this workflow going forward: don't delete the old key right away. Instead, generate a new key first, verify its validity using the method above, update your service settings to use the new key, confirm it works normally, and only then retire the old key. Keeping both keys active for a transition period prevents these kinds of incidents. A full guide to API key issuance and usage is available here. https://usingclaude.com/ko/api/start/claude-api-key-billing-guide