  We establish the existence of a finite-dimensional unitary realization for
every matrix-valued rational inner function from the Schur--Agler class on a
unit square-matrix polyball. In the scalar-valued case, we characterize the
denominators of these functions. We also show that every polynomial with no
zeros in the closed domain is such a denominator. One of our tools is the
Kor\'{a}nyi--Vagi theorem generalizing Rudin's description of rational inner
functions to the case of bounded symmetric domains; we provide a short
elementary proof of this theorem suitable in our setting.
