Can we create Montage, blend, AnimBP through code ???

For example, I have a character model and its skeleton and animation, I import them in UE4, and I configure them and make them work in AnimBP(AnimInstance). But I also have another character and same condition, I don’t wanna each time import them and do all this manully. So I wanna do it by code, and make it a plugin through press a btn or something like that it’ll all be done.

But I don’t know how to create montage、blend etc and configure them in code. Even if I Implement a UAnimInstance, how to create a state mache in code etc.

I think It could be done in code, but is there some tutorial about this part? for example, related API? or I have no choise but to study the animation related source code in engine by myself?