Confirm 'd' and 'Threshold' arguement; Create and API file