Need help with REST request

I am trying to do a REST request:

uses
  REST.Client, REST.Types;

procedure TForm1.ButtonDoRequestClick(Sender: TObject);
var
  RESTClient: TRESTClient;
  RESTRequest: TRESTRequest;
  RESTResponse: TRESTResponse;
  AudioStream, FileStream: TStream;
begin
  // Create a REST client and request
  RESTClient := TRESTClient.Create(nil);
  RESTClient.BaseURL := 'https://api.openai.com/v1/';
  RESTRequest := TRESTRequest.Create(nil);
  RESTRequest.Method := rmPOST;
  RESTRequest.Resource := 'synthesize';
  RESTRequest.Client := RESTClient;

  // Set the API key and request parameters
  RESTRequest.AddParameter('engine', 'davinci');
  RESTRequest.AddParameter('text', 'Hello, world!');
  RESTRequest.AddParameter('voice', 'en-US-Wavenet-A');
  RESTRequest.Params.AddItem('Authorization', 'Bearer ' + 'Your API key here', pkHTTPHEADER, [poDoNotEncode]);

  // Execute the request and get the audio response
  RESTResponse := TRESTResponse.Create(nil);
  try
    RESTRequest.Execute;
    if (RESTResponse.StatusCode >= 200) and (RESTResponse.StatusCode < 300) then
    begin
      AudioStream := TStringStream.Create(RESTResponse.Content);
      try
        FileStream := TFileStream.Create('audio.wav', fmCreate);
        try
          FileStream.CopyFrom(AudioStream, 0);
          ShowMessage('Audio saved to file!');
        finally
          FileStream.Free;
        end;
      finally
        AudioStream.Free;
      end;
    end
    else
    begin
      ShowMessageFmt('Error (%d): %s', [RESTResponse.StatusCode, RESTResponse.Content]);
    end;
  finally
    RESTClient.Free;
    RESTRequest.Free;
    RESTResponse.Free;
  end;
end;

Unfortunately, I just got an error message.

This appears to refer to standard RTL classes only, nothing TMS component specific?

How can this request be supported by TMS components?

I do not understand your question.

And in your first question, you mention : "I just got an error message".
So, what exact error message did you get?

The error message was: "Error (0):"

The question means: How can I use TMS VCL components for this request instead of the standard RTL?

Equivalent is in TMS FNC Cloud Pack, TTMSFNCRESTClient

See also this article