  We define and study the $(\infty,2)$-category
$\mathbf{Cat}_{\infty}(\mathcal{C})$ of $(\infty,1)$-categories internal to an
$(\infty,1)$-category $\mathcal{C}$ via an associated externalization
construction. In the first part, we show various formal closure properties of
$\mathbf{Cat}_{\infty}(\mathcal{C})$ regarding limits, tensors, cotensors and
internal mapping objects under the assumption of various suitable closure
properties of $\mathcal{C}$. In particular, we show that
$\mathbf{Cat}_{\infty}(\mathcal{C})$ defines a cartesian closed full
sub-$\infty$-cosmos of the $\infty$-cosmos
$\mathbf{Fun}(\mathcal{C}^{op},\mathbf{Cat}_{\infty})$ of $\mathcal{C}$-indexed
$(\infty,1)$-categories under suitable assumptions on $\mathcal{C}$. We
furthermore characterize the objects of $\mathbf{Cat}_{\infty}(\mathcal{C})$ by
means of a Yoneda lemma that expresses indexed diagrams of internal shape over
$\mathcal{C}$ in terms of an $(\infty,1)$-categorical totalization. In the
second part, we relate the general theory developed to this point to results in
the model categorical literature. We show that every model category
$\mathbb{M}$ gives rise to a "hands-on" $\infty$-cosmos
$\mathbf{Cat}_{\infty}(\mathbb{M})$ (of not-necessarily cofibrant objects)
directly by restriction of the Reedy model structure on
$\mathbb{M}^{\Delta^{op}}$. We then define an according right derived model
categorical externalization functor, and use it to show that the
$(\infty,1)$-categorical and the model categorical constructions correspond to
one another whenever $\mathcal{C}$ is presentable and $\mathbb{M}$ is a
suitable presentation thereof.
