Update api/index.php

found it from yg error log, packages need to be set as array.
Merge pull request #16 from turtlepod/patch-1

Declare packages as array.