only add api_fd if it is set (API enabled)