2 Get Requests and receiving a 401 on my second GET request

I am working on an open cat api project for my class. The homepage shows the image, temperament, description and wikipedia link of whichever breed you select from a dropdown menu. The homepage includes a navigation link that directs you to another html page that is random fact generator. My GET request for the homepage works, buy my GET request for random fact generator is not working. I keep getting the same message: “random.js:12 GET https://api.thecatapi.com/v1/facts 401 (Unauthorized)
(anonymous) @ random.js:12” "SyntaxError: Unexpected token ‘T’, "This is a “… is not valid JSON”. Can I only use my free api key to fetch one GET request?