Dielectric Elastomer Generators (DEGs) are promising devices able to convert mechanical to electrical energy by exploiting the variations in the capacitance of a deformable dielectric membrane. In this work the optimal performance of DEGs in-plane equibiaxial loading configuration is investigated. We analyze a four-stroke cycle which is chosen due to its simplicity and availability. Four failure modes of the DEG are accounted for: electric breakdown, electromechanical instability, ultimate stretch, and loss of the in-plane tensile state. Explicit expressions for the electromechanical fields in the membrane and the harvested energy are derived, and a constraint optimization procedure is employed to determine the optimal cycles. We find that if the electric breakdown strength is larger than a certain universal threshold value, the optimal cycle is independent of this parameter. This threshold value depends on the membrane ultimate stretch, and this dependence is different for low, moderate or high ultimate stretches. Analyses of DEGs with membranes belonging to the three regimes demonstrate that the DEG failure depends on the electric breakdown strength and the ultimate stretch. Accordingly, a diagram with six subregions corresponding to the type of failure is introduced as a design tool. DEGs with multi-layered membranes of two commercially available materials, an acrylic elastomer and a natural rubber, are considered. The number of layers is set according to a predefined load capacity parameter. We find that membranes with a moderate ultimate stretch ensure a cycle more efficient than those with high ultimate stretch, since a larger portion of the invested energy is converted.