Aseprite Compile, You can find some examples for this API or some tests.