set API not cookie