OpenAI API Key Tester

Paste your OpenAI API key below to instantly check if it is valid and has access to the API. Your key is tested client-side and is never stored on our servers.

[Ad Space]

How this tool works

When you click "Test API Key", this page makes a direct request to OpenAI's /v1/models endpoint using JavaScript. If OpenAI returns a 200 OK status, your key is valid. If it returns a 401 Unauthorized error, your key is invalid, revoked, or typed incorrectly. Because the request happens entirely in your browser, your API key is never logged or stored by ToolHunt.

Common OpenAI API Key Errors

How to test an OpenAI API key using cURL

If you are a developer and want to test your key locally, you can use the following terminal command:

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

If the key is valid, you will see a JSON list of available models (like GPT-4o or GPT-3.5-Turbo).