Ah, I found that it is in fact registered as a service... should have checked this first.
SlingBindings bindings = (SlingBindings) req.getSlingRequest().getAttribute(SlingBindings.class.getName());
SlingScriptHelper slingScriptHelper = bindings.getSling();
AssetStore store = slingScriptHelper.getService(AssetStore.class);
My next hurdle is figuring out why the rendition isn't persisted into CRX after the method successfully runs:
If I log.debug() all renditions after running this, I see that the rendition is added to the Asset's renditions list, with the correct path and name, but the rendition doesn't exist in CRX afterwards. Hmm.
Have you been successful on this issue. I'm having the same problem: my asset seem to have the newly created renditions, I can even get a link to it. But, as you might guess, the link throws a 404 since the rendition isn't in the CRX repo.
I would be glad to read what you have done to make it work.
It's been 6 months, so I don't recall much except that I solved it shortly after posting the comment. Probably grabbed an underlying Session instance and called the save() method?