TsgcHTTP_API_OpenAI › Properties › ReadTimeout
HTTP read timeout in milliseconds applied to every OpenAI REST request
property ReadTimeout: Integer read FReadTimeout write FReadTimeout;
—
Maximum time, in milliseconds, that the client waits for the server to start returning data before aborting the request. The default is 30000 (30 seconds), which covers most Chat Completions, Responses and Images calls. Increase this value for long running operations such as large image generations, reasoning models or streaming workloads that keep the connection idle between chunks. Setting 0 means wait indefinitely.
oAPI.ReadTimeout := 60000;
// allow up to 60 seconds for slow reasoning models
ShowMessage('Read timeout: ' + IntToStr(oAPI.ReadTimeout) + ' ms');