We don't have such a WebAPI sample for that, but I think our Service Edition has many this kind of samples. As you know the Service Edition is just referring MapSuite Core and using a MapEngine object to render the map on a bitmap image, so I think that would meet your case. For instance, you define an action in WebApiController, then map engine which includes all kinds of the layers will render them on a bitmap, in the end, return this bitmap to the end-user.
Additional: for how to export pdf in service Edition, please referring the sample named "UsePdfExtention" in HowDI sample.
Please let us know if any questions.