We propose a scheme for the generation of photons from a vacuum via time-modulation of a quantum system indirectly coupled to the cavity field through some ancilla quantum subsystem. We consider the simplest case when the modulation is applied to an artificial two-level atom (we call ‘t-qubit’, that can be located even outside the cavity), while the ancilla is a stationary qubit coupled via the dipole interaction both to the cavity and t-qubit. We find that tripartite entangled states with a small number of photons can be generated from the system ground state under resonant modulations, even when the t-qubit is far detuned from both the ancilla and the cavity, provided its bare and modulation frequencies are properly adjusted. We attest our approximate analytic results by numeric simulations and show that photon generation from vacuum persists in the presence of common dissipation mechanisms.