New API wrapper for the encoder.