Use Imager plugin with Element API?
In yii2 every instance of a module is stored in a public static property of the main class.

If the plugin is called image you can grab it via

Imager::getInstance()


This instance contains all the required components. The imager plugin it has 3 components

$this-&gt;setComponents([
    'imager' =&gt; ImagerService::class,
    'placeholder' =&gt; PlaceholderService::class,
    'color' =&gt; ImagerColorService::class,
]);


You can access those via Imager::getInstance()-&gt;imager or placeholder or color in this case the instance of the plugin is also stored in a static $plugin variable. You can call 

Imager::$plugin-&gt;imager


as well. You can see a working example here

use aelvan\imager\Imager as Plugin;
.... 
return Plugin::$plugin-&gt;imager-&gt;isAnimated($asset);


This is the function that is being called when you do craft.imager.transform -> the PHP equivalent what you want to do