I'm looking for a way to server or command line interface that a program can use to automatically generate a photorealistic satellite image of any portion of the Earth. It is critical that every such image be georeferenced, with every pixel corresponding to a geographic location. This interface must be machine-operable - something I can run with external code to generate images that same code will use, not a GUI software. Are there any such things out there, especially open-source stuff I can run myself?
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
This question is vague, so there are too many answers. The first question is online or offline, i guess you want to capture google satellite or bing maps or else online, the easiest way programmatically is using WMTS service. I'm guessing you already know the bounding box of your desired screen which is going to show the images, you can convert this bounding box to tile X,Y then find an address for a tile server to fetch the images from it, it's pretty easy. for example you can use google tile server http://mt1.google.com/vt/lyrs=y&x=1325&y=3143&z=13 , in this example you are getting the tile at X=1325 and Y=3143 and the zomm is 13. you can convert XY to longitude and latitude and vice versa. check this link for the related codes https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
1:find the bounding box 2:convert bottom left and top right of this bounding box to tile X and Y 3:find the related tiles ( you have to write a small code to find the related files beetween these 2 XY) 4:write a code to fetch the images from the WMTS address