Update api.php

Made it a little nicer to look at