Encountering "Invalid URL" Error When Creating Conversation Threads with Assistant API

I’m experiencing an issue with the Assistant API when trying to create a conversation thread. The error message returned is:
Invalid URL (POST /v1/assistants/{assistant_id}/threads)

It seems like the assistant ID is retrieved correctly, and the URL is generated properly. However, the endpoint URL might be incorrect or has changed. Could someone clarify how to resolve this issue?

function createThread() {
var assistantId = ‘asst_xxxxxxxxxxxxxxxxxxxxxxxx’; // Example Assistant ID
var apiKey = PropertiesService.getScriptProperties().getProperty(‘API_KEY’);

var options = {
    "method": "post",
    "contentType": "application/json",
    "headers": {
        "Authorization": "Bearer " + apiKey
    },
    "muteHttpExceptions": true
};

var url = `https://api.openai.com/v1/assistants/${assistantId}/threads`;

try {
    var response = UrlFetchApp.fetch(url, options);
    var responseText = response.getContentText();
    Logger.log(responseText);

} catch (error) {
    Logger.log("Error creating thread: " + error.message);
}

}

I’ve ensured the API key and assistant ID are correct. The error message suggests that the endpoint might be incorrect. Has anyone else encountered a similar problem or found a solution?