To determine the strength of essential electronic and magnetic interactions in the iridates Sr2IrO4 and Ba2IrO4 -potential platforms for high-temperature superconductivity -we use many-body techniques from wavefunction-based electronic-structure theory. Multiplet physics, spin-orbit interactions, and Ir-O hybridization are all treated on equal footing, fully ab initio. Our calculations put the lowest d-d excitations of Sr2IrO4/Ba2IrO4 at 0.69/0.64 eV, substantially lower than in isostructural cuprates. Charge-transfer excitations start at 3.0/1.9 eV and the magnetic nearestneighbor exchange coupling is 51/58 meV. Available experimental results are fully consistent with these values, which strongly constrains the parametrization of effective iridate Hamiltonians.