I had this exact same problem on gentoo and ended up installing it with the gentoo package. I know if you download the actual source from www.imagemagick.org, you can get the magick/api.h from that source file and then use it to compile your code.
Godzirra!
Destroying Neo Tokyo since 1954