TsgcHTTP_API_OpenAI › Methods › DeleteFineTuneModel
Deletes a fine-tuned model so it is no longer available for inference
function DeleteFineTuneModel(const aModel: string) : TsgcOpenAIClass_Response_Delete;
| Name | Type | Description |
|---|---|---|
aModel | const string | Name of the fine-tuned model to delete (for example "ft:gpt-4o-mini:acme::abc123") |
Deletion result with the model name and a Deleted flag (TsgcOpenAIClass_Response_Delete)
Calls the DELETE /v1/models/{model} endpoint. Only fine-tuned models owned by the authenticated organization can be deleted; attempting to delete a base OpenAI model fails. The operation is immediate and cannot be undone; any inference requests referencing the deleted model will return an error afterwards.
oResponse := oAPI.DeleteFineTuneModel('ft:gpt-4o-mini:acme::abc123');
if oResponse.Deleted then
ShowMessage('Model removed');