For large or deep containers, up to 3 inches of material may be used. This layer will help to clean the air of the fumes caused when the organic materials begin to decompose. The third layer is a thin cover of sphagnum moss, spread over the first two layers. The purpose of this, is to prevent the soil from sifting down into the drainage layer, which would render it useless. The final level is that of your soil.
Many garden centers sell a potting mix specifically for terrariums.
In reality, all that you normally get for the extra money, is sand added to their regular potting mix. Do not add any fertilizer to the potting mix. It already has enough nutrients to last a long time. Too much will cause the plants to out grow their surroundings, much too quickly. If your intent is to create a 'desert garden', be sure to add extra sand to the soil mixture, and additional gravel to the drainage level.