3-Amino-2,4,6-triiodobenzoic acids optionally substituted in the 5-position by amino or carboxy or a derivative thereof react with dibasic acid anhydrides to give the corresponding cyclic imides (A), which can be hydrolyzed to the corresponding anilic acids (B). The latter can be further alkylated on the anilide nitrogen atom. Compounds A and B are useful as cholecystographic and urographic agents.