add API script on initialization