If your API key has been compromised, immediately revoke it and generate a new one. Contact the API provider if necessary and assess your application's security measures to avoid further intrusions.