Skip to content

API Key Not Working

Last updated 2026-03-10

Common Causes

If your API key is not working, it is usually one of these issues:

  • The key has been revoked or rotated.
  • The key was copied incorrectly (missing characters or extra whitespace).
  • The key belongs to a different organization than the one you are trying to access.
  • Your account has been deactivated or your plan has expired.

Verify Your Key

Go to Settings > API Keys in your CodeContext dashboard. Check that the key you are using is listed and shows as "Active." You can identify your key by the last four characters shown in the list.

If the key is not listed, it may have been revoked. If it shows as inactive, it has been disabled and you need to create a new one.

Create a New Key

If you cannot find your key or suspect it was compromised, the easiest fix is to create a new one:

  1. Go to Settings > API Keys.
  2. Click Create New Key.
  3. Copy the new key immediately.
  4. Update the key in your AI tools.
  5. Revoke the old key if it is still active.

Organization Mismatch

API keys are scoped to a specific organization. If you belong to multiple organizations, make sure you are using the key from the correct one. You can check which organization a key belongs to on the API Keys page.

Still need help?

Our support team is happy to help with any questions you may have.

support@codecontext.app