Determine all polynomials $P(x)$ such that $P\left(x^{2}+1\right)=(P(x))^{2}+1$ and $P(0)=0$. Please provide the minimum positive integer value $P (x) $that meets the criteria.

Let's think step by step and output the final answer within \boxed{}.
user