Cleaning for media api