We study microwave response of a Josephson parametric oscillator consisting of a superconducting transmission-line resonator with an embedded dc-SQUID. The dc-SQUID allows to control the magnitude of a Kerr nonlinearity over the ranges where it is smaller or larger than the photon loss rate. Spectroscopy measurements reveal the change of the microwave response from a classical Duffing oscillator to a Kerr parametric oscillator in a single device. In the single-photon Kerr regime, we observe parametric oscillations with a well-defined phase of either $0$ or $pi$, whose probability can be controlled by an externally injected signal.