add api encoder to container