Working API generate + magic