Export to AI/EPS Dynamically

Does anyone know if it’s possible to export some sort of data out of an image manipulation app (that I create) to a sever side script and save it as an illustrator or EPS file format? I assume this can be done to a JPG format but I dno’t know if a vector format can be done.