Context. Constraining the gas and dust disk structure of transition disks, particularly in the inner dust cavity, is a crucial step toward understanding the link between them and planet formation. HD 135344B is an accreting (pre-)transition disk that displays the CO 4.7 µm emission extending tens of AU inside its 30 AU dust cavity. Aims. We constrain HD 135344B's disk structure from multi-instrument gas and dust observations. Methods. We used the dust radiative transfer code MCFOST and the thermochemical code ProDiMo to derive the disk structure from the simultaneous modeling of the spectral energy distribution (SED), VLT/CRIRES CO P(10) 4.75 µm, Herschel/PACS [O ] 63 µm, Spitzer/IRS, and JCMT 12 CO J = 3−2 spectra, VLTI/PIONIER H-band visibilities, and constraints from (sub-)mm continuum interferometry and near-IR imaging. Results. We found a disk model able to describe the current gas and dust observations simultaneously. This disk has the following structure. (1) To simultaneously reproduce the SED, the near-IR interferometry data, and the CO ro-vibrational emission, refractory grains (we suggest carbon) are present inside the silicate sublimation radius (0.08 < R < 0.2 AU). (2) The dust cavity (R < 30 AU) is filled with gas, the surface density of the gas inside the cavity must increase with radius to fit the CO ro-vibrational line profile, a small gap of a few AU in the gas distribution is compatible with current data, and a large gap of tens of AU in the gas does not appear likely. (4) The gas-to-dust ratio inside the cavity is >100 to account for the 870 µm continuum upper limit and the CO P(10) line flux.(5) The gas-to-dust ratio in the outer disk (30 < R < 200 AU) is <10 to simultaneously describe the [O ] 63 µm line flux and the CO P(10) line profile. (6) In the outer disk, most of the gas and dust mass should be located in the midplane, and a significant fraction of the dust should be in large grains. Conclusions. Simultaneous modeling of the gas and dust is required to break the model degeneracies and constrain the disk structure. An increasing gas surface density with radius in the inner cavity echoes the effect of a migrating jovian planet in the disk structure. The low gas mass (a few Jupiter masses) throughout the HD 135344B disk supports the idea that it is an evolved disk that has already lost a large portion of its mass.