Solution (source code)

= Solution

The zero mode of the free embedding field enforces momentum conservation, while contractions of normal-ordered exponentials give the <Koba-Nielsen factor>:
$$
\left\langle\prod_{i=1}^n:e^{ik_i\cdot X(z_i,\bar z_i)}:\right\rangle
=(2\pi)^{26}\delta^{26}\!\left(\sum_i k_i\right)
\prod_{i<j}|z_i-z_j|^{\alpha'k_i\cdot k_j}.
$$
Combining this with the supplied ghost correlator yields, up to the conventional overall normalization,
$$
\boxed{F_n=g_c^{,n-2}|z_{12}z_{23}z_{31}|^2
\prod_{i<j}|z_i-z_j|^{\alpha'k_i\cdot k_j}}.
$$
Therefore
$$
A_n=\delta^{26}\!\left(\sum_i k_i\right)
\int d^2z_4\cdots d^2z_n\,F_n,
$$
with the factor $(2\pi)^{26}$ absorbed into the amplitude normalization used by the question.