API script stuff

Don't expect these commit messages to become better any time soon