run ajax after form is submitted and saved

I want to save a form, but after saving it I need to run an ajax written in another javascript file

You need to provide more details and be more clear as to what you want to have happen, where, and when.

Forms are saved on the server.

JavaScript runs in the browser.

Strictly speaking, the two are not directly related.

I have a form… that contains data that needs no be posted to an API address, from that post I get a response with a code and with that code I need to post images to another API address

So that all would be done by JavaScript in the browser.

got it, I was trying to do it by requests.post and then run de ajax for images