There is code in Chromium that's used for generating a PDF version of the current page, before displaying it in Print Preview.
Is it possible for a Chrome extension to access this API, to get a PDF version of the current page?
Chrome does not offer any such API for extensions.
If your aim is to generate PDF files using Chrome, you can do that by Print > Destination > Save as PDF
.