crate interface for the api