Initial impl of api gen