Pervaporation-assisted crystallization of active pharmaceutical ingredients (APIs)