init the dir and add the api file