Renting out rooms is fine, there are laws that permit how many people can live under 1 dwelling but if its 1 person per room it should be fine as long as room has Windows and a closet..
If you're planning to do Airbnb NYC has new requirements that will take affect soon..
Also keep in mind when renting out rooms in some markets Utilities are included in rent..
@Keila Rosario I suggest you do multifamily and live in one of the units. Don't know how much you have saved to get started but taking advantage of FHA is a much cheaper way to enter the NYC market. You might want to look into regulations regarding renting per room (I think NYC considers that an SRO - single room occupancy - and the building might need to be zoned for that). Again, just like with basement rentals, people do it, but they just haven't gotten caught lol. Also, if you live in one of the units you could do AirBnB for the other units and I don't think it would be considered a "hotel" since you live in the property as well (check that though). Good luck!