I've done it. This is the minimal code. I had to make HandleDroppedPayload() public, though, which is a hack. Maybe you have a more elegant way of doing this.
private void CreateSpriteCollection() {
// create game object with sprite collection
GameObject go = new GameObject("TestSpriteCollection");
tk2dSpriteCollection collection = go.AddComponent<tk2dSpriteCollection>();
collection.version = tk2dSpriteCollection.CURRENT_VERSION;
tk2dEditorUtility.SetGameObjectActive(go, false);
string path = "Assets/HomageData/TestSpriteCollection.prefab";
Object p = PrefabUtility.CreateEmptyPrefab(path);
GameObject collectionPrefabGo = PrefabUtility.ReplacePrefab(go, p, ReplacePrefabOptions.ConnectToPrefab);
tk2dSpriteCollection collectionFromPrefab = collectionPrefabGo.GetComponent<tk2dSpriteCollection>();
GameObject.DestroyImmediate(go);
tk2dSpriteCollectionEditorPopup editor = EditorWindow.GetWindow(typeof(tk2dSpriteCollectionEditorPopup), false, "SpriteCollection" ) as tk2dSpriteCollectionEditorPopup;
editor.SetGenerator(collectionFromPrefab);
// load textures
Texture2D texture1 = (Texture2D)AssetDatabase.LoadAssetAtPath("Assets/Game/Textures/leg_cut1.png", typeof(Texture2D));
Texture2D texture2 = (Texture2D)AssetDatabase.LoadAssetAtPath("Assets/Game/Textures/leg_cut2.png", typeof(Texture2D));
Object[] payload = new Object[]{ texture1, texture2 };
// simulate drag and drop to editor
editor.HandleDroppedPayload(payload);
editor.Commit(); // create the sprite collection
editor.Close();
}