Export model to svg

Hello! I am trying the bpmn Model API to create processes.
I would like to export the process to svg file. Is that possible? How? I couldn’t find any resource.
Thank you!