Automated distortion fits using WCS file provided by astrometry.net
There appear to be some fundamental issues with the astrometry.net service. It does not return a correct set of matched catalog RA, Dec coordiantes. The API docs claim they do, but the numbers (both field_ and index_ra and dec) are significantly offset from the catalog values specified in the rdls.fits file. There also doesn't seem to be a way to connect matched star indices to the correct catalog coordinates.
This code explores querying the resulting fits tables and tries to connect the x, y coordinates to real catalog values (unsuccessfully): https://gist.github.com/dvida/fa37985c424d36daa0ad029d2d15f277
The distortion fit appears to be challenging for their method which produces large errors near the edges of the image.