12. Given $A(\sqrt{\pi}, a) 、 B(\sqrt{\pi}, b)$ are two different points on the curve $y^{2}+x^{4}=2 x^{2} y+1$. Then the value of $|a-b|$ is ( ).
(A) 1
(B) $\frac{\pi}{2}$
(C) 2
(D) $\sqrt{1+\pi}$
(E) $1+\sqrt{\pi}$
12. C.

From the problem, substituting $x=\sqrt{\pi}$ into the equation gives
$$
\begin{array}{l}
y^{2}+(\sqrt{\pi})^{4}=2(\sqrt{\pi})^{2} y+1 \\
\Rightarrow(y-\pi)^{2}=1 \Rightarrow y=\pi \pm 1 .
\end{array}
$$

Therefore, $|a-b|=|(\pi+1)-(\pi-1)|=2$.