Let Xi, i∈N, be i.i.d. B-valued random variables, where B is a real separable Banach space. Let Φ be a smooth enough mapping from B into R. An asymptotic evaluation of Zn=E(exp(nΦ(∑i=1nXi/n))), up to a factor (1+o(1)), has been gotten in Bolthausen [Probab. Theory Related Fields 72 (1986) 305–318] and Kusuoka and Liang [Probab. Theory Related Fields 116 (2000) 221–238]. In this paper, a detailed asymptotic expansion of Zn as n→∞ is given, valid to all orders, and with control on remainders. The results are new even in finite dimensions.