TsgcHTTP_API_Anthropic › Properties › ReadTimeout
Maximum time in milliseconds to wait for a response from the Anthropic API before aborting the request
property ReadTimeout: Integer read FReadTimeout write FReadTimeout;
—
ReadTimeout applies to every HTTP call made against https://api.anthropic.com/v1, covering both simple requests and streaming Server-Sent Event responses. Larger values should be used when calling models that produce long completions or when CountTokens/CreateMessage is invoked with large prompts. A value of zero means no timeout.
oAPI := TsgcHTTP_API_Anthropic.Create(nil);
oAPI.AnthropicOptions.ApiKey := 'sk-ant-...';
// wait up to 120 seconds for Claude to finish the response
oAPI.ReadTimeout := 120000;