7. Let $z$ be a complex number, $\mathrm{i}$ be the imaginary unit. If $|z|=1$, $|\bar{z}+\mathrm{i}|=1$, then when $(z+\mathrm{i})^{n}\left(n \in \mathbf{N}_{+}\right)$ is a real number, the minimum value of $|z+i|^{n}$ is ( ).
(A) $\sqrt{3}$
(B) 3
(C) $2 \sqrt{3}$
(D) $3 \sqrt{3}$
7. D.
Let $z=x+y \mathrm{i}(x, y \in \mathbf{R})$.
From $|z|=1,|\bar{z}+\mathrm{i}|=1$, we get
$$
\left\{\begin{array} { l } 
{ x ^ { 2 } + y ^ { 2 } = 1 , } \\
{ x ^ { 2 } + ( 1 - y ) ^ { 2 } = 1 }
\end{array} \Rightarrow \left\{\begin{array}{l}
x= \pm \frac{\sqrt{3}}{2}, \\
y=\frac{1}{2} .
\end{array}\right.\right.
$$

Thus, $z= \pm \frac{\sqrt{3}}{2}+\frac{1}{2} \mathrm{i}$,
$$
\begin{array}{l}
|z+\mathrm{i}|^{n}=\left|\sqrt{3}\left( \pm \frac{1}{2}+\frac{\sqrt{3}}{2} \mathrm{i}\right)\right| \\
=\left|\sqrt{3} \mathrm{e}^{\frac{1-k_{3}}{3}}\right|^{n}=(\sqrt{3})^{n}(k \in\{1,2\}) .
\end{array}
$$

It is clear that the smallest value of $n$ for which $(z+\mathrm{i})^{n}$ is a real number is 3.
At this time, the minimum value of $|z+i|^{n}$ is $(\sqrt{3})^{3}=3 \sqrt{3}$.