The present invention provides for a polyketide synthase (PKS) capable of synthesizing a dicarboxylic acid (diacid). Such diacids include diketide-diacids and triketide-diacids. The invention includes recombinant nucleic acid encoding the PKS, and host cells comprising the PKS. The invention also includes methods for producing the diacids.