Code generation for these APIs appears to treat id, and possibly timeout, as possibly provided in both the path and body rather than one or the other.
https://github.com/elastic/elasticsearch-js/blob/HEAD/src/api/api/ml.ts#L4576-L4581
Thanks @miguelgrinberg for catching!