Opt-in/out thrue API?

Started using Piwik yesterday and I like it so far.
The only thing I dislike about it is that one seems to need to use a iframe for the opt-in/out functionality.
I can’t use iframes.

Is there a API way to do the opt-in/out?