Ensure API root URL is constructed correctly