repo = gl.add_project(reponame) # this creates the project in the user's namespace
if repo:
    mygroup.transfer_project(repo.id) # api user needs admin rights for this, while directly creating it within group mygroup would work since it is a master user on the group :(