Access Image Transforms for S3 images via Element API
Yep, you can access transforms the same way you would in a template - via the asset’s getUrl() method.

That $transform argument can either be a string, set to the handle of one of your transforms in Settings → Assets → Transforms, or in can be an array that defines the transform settings at runtime. (Or it can be null if you just want the source image URL.)

Keep in mind that if the transform hasn’t been created yet, the default behavior of getUrl() will be to return a temporary URL that actually triggers the transform generation process, and responds with a redirect pointing to the new image once it has actually been created. But in this case you’d probably prefer for the transform to be created in the actual Element API request, so the actual URL can be returned right off the bat. You can do that by enabling the generateTransformsBeforePageLoad config setting at runtime.

So your transformer function would look something like this:

'transformer' =&gt; function(EntryModel $entry) {
    // Generate new image transforms right away
    craft()-&gt;config-&gt;set('generateTransformsBeforePageLoad', true);

    $blockData = [];

    foreach ($entry-&gt;myMatrixField as $block) {
        $image = $block-&gt;myAssetsField-&gt;first();

        if ($image) {
            $imageUrl = $image-&gt;getUrl('myTransform');
        } else {
            $imageUrl = null;
        }

        $blockData[] = [
            'image' =&gt; $imageUrl,
            // ...
        ];
    }

    return [
        'blocks' =&gt; $blockData,
        // ...
    ];
},