Beschikbare Claude-modellen weergeven en informatie erover ophalen.
Geeft alle beschikbare Claude-modellen weer.
Anthropic := TsgcHTTP_API_Anthropic.Create(nil);
Anthropic.AnthropicOptions.ApiKey := 'API_KEY';
WriteLn(Anthropic._GetModels);
Haalt informatie op over een specifiek model.
Anthropic := TsgcHTTP_API_Anthropic.Create(nil);
Anthropic.AnthropicOptions.ApiKey := 'API_KEY';
WriteLn(Anthropic._GetModel('claude-sonnet-4-20250514'));
Gebruik de getypeerde responsklasse voor gestructureerde toegang tot modelgegevens.
Anthropic := TsgcHTTP_API_Anthropic.Create(nil);
Anthropic.AnthropicOptions.ApiKey := 'API_KEY';
oModels := Anthropic.GetModels;
Try
for i := 0 to Length(oModels.Data) - 1 do
WriteLn(oModels.Data[i].Id + ' - ' + oModels.Data[i].DisplayName);
Finally
oModels.Free;
End;