separate client and api