The error message "undefined - Invalid API key" indicates that the API key being used is either missing or invalid. Let's go through the steps to fix this:
-
Obtain a Free API Key:
- Join our Discord server if you haven't already.
- Go to the Bot Channel and use the
/keycommand to receive your free API key. Make sure to keep it secure and don't share it with others.
-
Correct the Setup in JanitorAI:
- Ensure you are using the correct URL for the API endpoint. For JanitorAI, you should use the full endpoint. Based on your screenshots, it seems like you're using the correct endpoint:
https://api.pawan.krd/cosmosrp/v1/chat/completions. - Enter the API key you obtained in the βAPI Keyβ field in JanitorAI. It should not say "undefined"; replace that with your actual API key.
- Double-check for any extra spaces or typos in both the API URL and the API key fields.
- Ensure you are using the correct URL for the API endpoint. For JanitorAI, you should use the full endpoint. Based on your screenshots, it seems like you're using the correct endpoint:
-
Refresh the Page:
- After making these changes, refresh the JanitorAI page to ensure it picks up the new settings.
If you follow these steps and still face issues, please ensure you have joined our Discord server to make sure you have the correct API key. You can also consider creating a support ticket in the Create Ticket Channel if the problem persists.
Please note: This is an automated response from @midnight swan. While it strive to provide accurate assistance, It may occasionally make mistakes. If you find any inaccuracies or need further clarification, feel free to wait for our community helpers to give you further guidance. Thank you.