Update encode api example [ci skip]