Local api

Add support for local api