Add support for pickled api.