1. Prepare onion mixture: In a bowl, combine the sliced onions, gram flour, salt, turmeric powder, and red chili powder (if using). Mix well.
2. Add water: Gradually add water to the onion mixture and mix until it forms a thick batter.
3. Add baking soda: Add the baking soda and mix well.
4. Heat oil: Heat oil in a deep frying pan over medium heat.
5. Fry bhajis: Using a spoon, drop small portions of the onion mixture into the hot oil. Fry until the bhajis are golden brown and crispy.
6. Drain excess oil: Remove the bhajis from the oil and place them on a paper towel to drain excess oil.
7. Serve: Serve the onion bhajis hot with a cup of tea or coffee, or as a side disH.