creating the api