How do I access the category of an entry with Element API?
Same as you would access it from a Twig template.  If you're positive there will always be one category selected, then this would work:

'transformer' =&gt; function(EntryModel $entry) {
    return [
        'category' =&gt; (string)$entry-&gt;categoryHandle[0],
    ];
},