1. no1. Is it possible to embed a pokemon showdown window into a website?
2. Is it possible to have a link or a similar way to start a battle with an ai bot? (let's say, i have a showdown team and an ai bot to play against using that team, and made a website and with a button "start", on clicking that button, a window could open and a battle would start with the bot with whichever team you choose for yourself)
3.If yes, is there any api or library to do that or do I have to tweak the open sourced code to implement something like this?
2. We permit bots to connect to and play battles as they have no advantage or information over human players. For this to happen, you would of course need to write a bot that connects to showdown and responds to protocol messages as appropriate. Alternatively You could take the the source and build your own thing from it (server is licensed under MIT, client is not, please check that license before using anything from the client's source code). https://github.com/smogon/pokemon-showdown/
3. We don't have an API but I can recommend the PKMN package https://github.com/pkmn/ps#readme