I have read that the SMOTE package is implemented for binary classification. In the case of n classes, it creates additional examples for the smallest class. Can I balance all the classes by running the algorithm n-1 times?
Yes that is what SMOTE does, even if you do manually also you get the same result or if you run an algorithm to do that.
There are couple of other techniques which can be used for balancing multiclass feature. Attaching those 2 links for your reference.
Link 3 is having implementation of couple of oversampling techniques:
ROSE also can be used for Oversampling.
Hope my answer is helpful. Do let me know of you have any additional questions.
I am pretty sure that the SMOTE package in python can also be used for multi-class as well.
Just you can check its implementation for iris dataset-
-Please correct me if I am wrong.