What is the best API for registering and configuring domain names?
There is no general API for this. You have to check back with your own domain registration organization. This is specific to the related domain provider.
I'm trying to make a website that allows you to setup a photo gallery with a custom domain name.
Users of the site don't know how to register or configure domain names, so this has to be done for them.
User enters desired domain name in a box (we check if it's available) and click 'register' button and our website registers the domain name for them and sets up the website automatically (when user goes to that domain name, the photo gallery just works, no technical skills needed).