Using AI Director with the API