instead of php -q, which isn't defined for any php executable I have access to, use /usr/bin/php /path/to/api/cron.php
This is because cron generally doesn't have that on its path so can't find it without explicitly defining it.
Try reading the wiki too.