post_with_file() in api.php makes me squinty. There's a lot of dead code in there; unless I'm missing something, that function is only called from infer_faceshape(), and that function is passing a harcoded empty array for the second parameter, which means the foreach(...) loop in it never fires. Ditto for the $filename parameter and the conditional that handles it. I'd also raise some concern about passing $file_path directly to your post data; WP core does some upload filename sanitation, I think, but I don't recall how much or how good it is (or isn't), and anyone that can reach your post_with_file() function might be able to post arbitrary data to your API endpoint (but maybe your API is robust enough that that's not a big deal). WP core has some functions for handling file uploads and filename sanitation that might be helpful here, e.g.: https://developer.wordpress.org/reference/functions/media_ha...
If your plugin is only storing an API key and another setting or two, the best practice is to use WP's options API instead of creating your own table: https://codex.wordpress.org/Options_API
Overall though, Copilot produced some code that's pretty darn standard for the WP community, and knocking it out in 2 hours starting from scratch is way more efficient than I could (or would want to) knucklebust it myself. Cool!