My oven does not work at the moment, but I have an air fryer. Is it possible to bake a cake in the air fryer? 
You can, absolutely. But it will be tricky. The unique aspect of an air fryer is its high airflow, which dries out the surface of foods quite quickly. (In a residential kitchen, only a deep fryer comes close to matching that, hence "air fryer".) That's great for crispiness, but for baked goods, you have to consider how much "crispiness" you actually want. If I had to cook a cake in the air fryer, I would find a recipe which was intended to be relatively flat and quick-cooking. If I just wanted to make a "baked" dessert in it, I'd make brownies instead. (Air fryers are great at brownies, because they're flat, quick-cooking, and benefit from a crispy top.) 