complete encoding api calls