I need to mass-create groups using the API

It looks to me like it’s called createGroup not createGroups. It says that it “Creates a group” not “Creates as many groups as you want.”

You’ll need to loop through the values yourself and call it for each group you want to add. You probably want to either insert some delay or build in code that will re-try when you hit rate limits.