  A new model of nonlinear electromagnetic fields possessing a dimensional
parameter $\beta$ is proposed. Electromagnetic fields are considered as the
source of the gravitation field and accelerated expansion of the universe is
driven by nonlinear electromagnetic fields. We consider the magnetic universe
and the stochastic magnetic field is a source of the universe acceleration.
After the universe inflation and the accelerated expansion the universe
decelerates. We show the causality of the model and a classical stability at
the deceleration phase. The spectral index, the tensor-to-scalar ratio, and the
running of the spectral index were estimated that approximately fulfil the
PLANK, WMAP, and BICEP2 data.
