We don't have any API for the media library, and I don't know what the ID in the Media Library URL references. So, I doubt that there's any way to generate the Media Library URL.
I'll mark this as a feature request for when we revisit the Media Library.
For that you just have to open the image cropper and click on the View Real Size Image button.
I'm curious though to understand a bit more about what you're trying to achieve.
Can you detail a bit your use case to see if we have a better solution for this ?
I have clients that are unhappy with the search/sorting/filtering functionality within the Media Library.
I'm trying to build an internal tool to be able to display all images we have on the website and if you click on the image that'd redirect you to the image's page within Prismic.
Currently, building something like that is impossible since the image ID within the Prismic's writing room is not exposed to the Public API. Not sure why is this exactly.