Light and heavy pentaquarks are described within a constituent quark model based on a spin-flavor hyperfine interaction. In this model the lowest state acquires positive parity. The masses of the light antidecuplet members are calculated dynamically using a variational method. It is shown that the octet and antidecuplet states with the same quantum numbers mix ideally due to SU(3)F breaking. Masses of the charmed antisextet pentaquarks are predicted within the same model.