Let $X$ be a variety with canonical singularities such that $K_X$ is ample. Do you have a reference of the fact that every birational map from $X$ to itself is biregular? Thank you

Can't you reason as follows: ? Take some multiple of $nK_X$ that is very ample. A birational map from $X$ to itself can not contract any divisor and the inverse map has the same property (here we use that $K_X$ is ample). So, any section of $nK_X$ will be sent to a section of $nK_X$ (by Hartogs principle). So we obtain an induced isomorphism $H^0(nK_X)\to H^0(nK_X)$. The map from $X$ to $X$ can be seen as restriction of the projective transformation $\mathbb P(H^0(nK_X))\to \mathbb P (H^0(nK_X))$ to the pluricanonical embedding of $X$ to $\mathbb P (H^0(nK_X))$. I.e. this map is biregular. 


I don't know a reference, but it should not be too hard to prove directly: Let $\phi:Y\to X$ be a birational morphism whose exceptional locus is a divisor. Then by your assumptions $\phi^*K_X\subseteq K_Y$ and the difference consists of strictly not nef divisors. So $\phi^*K_X$ is the moving part of $K_Y$ and hence $\phi$ is uniquely determined. Now if you have a birational map, resolve the indeterminacies and argue that both maps from the resolution has to be the same. (I have to run now. If this seems too sketchy I will try to fix it later) 


Let $R$ be the canonical ring of $X$. We know that $R$ is finitely generated. Furthermore $$X\cong Proj(R) = X_{can}$$ since $K_{X}$ is ample and $X$ has at most canonical singularities. Now, any birational automorphism $f:X\dashrightarrow X$ induces an automorphism of the canonical ring $R$ which in turns induces a biregular automorphism of $X$. So $f$ itself is biregular. More generally, if $X,Y$ are projective varieties with $K_{X},K_{Y} $ ample and at most canonical singularities, then any birational map $f:X\dashrightarrow Y$ is indeed biregular. 

