Headless graph generation

Hi, new metabase user here. Still learning about its capabilities. One of the requests from one of my users is the ability to generate a graph in a headless mode. So we would (hypothetically) execute some process in a Jenkins pipeline, send the data to metabase via an API call, produce a static image, and then save it somewhere for later. All of this would be a headless call.

Does anyone have experience with this or know if it's possible? We don't mind learning how to make API calls.