Invoke Assistant AI programmatically

Hi,
I wanted to know if it is possible to invoke the AI ​​Assistant I created in my account using programming like I do with ChatGpt like this:

String apiUrl = “THE URL”;
HttpURLConnection connection = (HttpURLConnection) new URL(apiUrl).openConnection();

        connection.setRequestMethod("POST");
        connection.setRequestProperty("Content-Type", "application/json");
        connection.setRequestProperty("Authorization", "Bearer MYKEY");

        JSONObject request = new JSONObject();
        request.put("model", "text-davinci-003");
        request.put("max_tokens", 500);
        request.put("prompt", input);
        request.put("temperature", 1.0);

Thank You
Daniele