use public api endpoint instead of localhost