Is it possible to retrieve the camera stream and use it in a website

I was wondering if it's possible to use something like the API key or an Application Key to retrieve the webcam stream and display it on a personal website that I would make from sratch. The goal is just to build a site with the camera stream to be able to share it with friends. I am currently using Octoeverywhere wich works fine but seems to not be infinite and eventually I will need to pay.

So after looking a bit more I was able to find a way to retrieve the Application Key with a JS library (Application Keys Plugin β€” OctoPrint master documentation). Still need to find how to get the webcam feed.

This won't help you in your quest for making your stream publicly accessible. You don't need an API key anyway to access the stream. The only other solutions I know of outside of OctoEverywhere (which is worth paying for IMHO) is Obico, Simply Print, or my RTMPStreamer plugin (publish to twitch or YouTube Live). I will warn you ahead of time though that my plugin is best suited for running on a Pi 4 or higher with an ethernet connection instead of WiFi.

I tried Obico but the stream with the app seems to be stuck at 0.1FPS. Are the others plugin you gave, able to give an embed code of some sort for an HTML page or with either JS.

Simply Print has its own interface, so not sure you can embed it. Twitch can be embedded if you are running a site that is accessible via fully qualified domain name. Not sure about embedding YouTube live anymore. If you want to risk the security implications (not recommended) you could put forward to the pi on port 5000. I would only do that if it was hardened by a reverse proxy or alternatively provide VPN access.