It should do. You'd basically have an autorun event activated by the "against AI" option and an opponent turn switch which opens an xhttprequest to the API and uses the result to move the event corresponding to the relevant piece and then turn the opponent turn switch off so the player can input their move.
I have a potential flow in my head for how it could work with your project.