Consider $(x,y)\in\mathbb{Z}^2$ being a solution of the above equation. If $y=0$ one has $x^2+1> 0$. Let $y\in 2\mathbb{Z}\backslash \{0\}.\Rightarrow 4\mid y^3\Rightarrow x^2=y^3-1\equiv_4 3$, which contradicts $x^2\equiv_4 0,1,2$ for any $x\in\mathbb{Z}$. Therefore let $y\in 2\mathbb{Z}+1\Rightarrow x^2=y^3-1\in 2\mathbb{Z} \Rightarrow x\in 2\mathbb{Z}$, since from $x\notin 2\mathbb{Z}\Rightarrow x^2\notin 2\mathbb{Z}$.
Therefore consider solutions $(x,y)\in 2\mathbb{Z}\times (2\mathbb{Z}+1)$. In $\mathbb{Z}[i]$, which is euclidean, therefore factorial, one has $$x^2+1=(x+i)(x-i).$$
Since any unit is a divisor of any element and every element splits into a unique factorization of prime elements, consider w.l.o.g. $p\in \mathbb{Z}[i]$ prime, such that
$$p\mid (x+i)\quad\wedge\quad p\mid (x-i).$$
$\Rightarrow p \mid (x+i)-(x-i)=2i=(1+i)^2\Rightarrow p\mid (1+i)$, since $p$ is prime.
Let $\alpha\in\mathbb{Z}[i]$, such that $(1+i)=\alpha\cdot p.$
$$\Rightarrow N(\alpha)N(p)=2 \Rightarrow N(\alpha)=1,\text{ since $p$ is prime}\Rightarrow \alpha\in\{1,-1,i,-i\}$$
It is easy to see that $(x+i),(x-i)\in2\mathbb{Z}\times (2\mathbb{Z}+1)i$ are no multiple of $\alpha(1+i)$. This means
$$p=\alpha( 1+i )\nmid x+i,\quad p=\alpha( 1+i )\nmid x-i,$$
i.e. there is no prime element $p$ which divides both $x+i$ and $x-i$. Therefore the greatest common divisor of $x+i$ and $x-i$ must be an unit.
Question: How can I derive contradiction from here? I saw someone stating that $x+i$ must be a cube in $\mathbb{Z}[i]$, but why? From having
$$(x+i)(x-i)=x^2+1=y^3$$
does not follow that $(x+i)$ is a cube right? Somehow one must use that $gcd(x+i,x-i)=1$?