fixed api build method [ci skip]