SpyBara
Go Premium

python/resources/models/methods/delete/index.md 2026-05-02 05:57 UTC to 2026-05-05 23:00 UTC

This page contains 65 additions and 0 deletions.

2026
Tue 5 23:00 Tue 19 06:34
Data Information:
  • After 2026-05-05 06:03 UTC, this monitor no longer uses markdownified HTML/MDX. Comparisons across that boundary can therefore show more extensive diffs.

Delete a fine-tuned model

models.delete(strmodel) -> ModelDeleted

delete /models/{model}

Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.

Parameters

  • model: str

Returns

  • class ModelDeleted: …

    • id: str

    • deleted: bool

    • object: str

Example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
model_deleted = client.models.delete(
    "ft:gpt-4o-mini:acemeco:suffix:abc123",
)
print(model_deleted.id)

Response

{
  "id": "id",
  "deleted": true,
  "object": "object"
}

Example

from openai import OpenAI
client = OpenAI()

client.models.delete("ft:gpt-4o-mini:acemeco:suffix:abc123")

Response

{
  "id": "ft:gpt-4o-mini:acemeco:suffix:abc123",
  "object": "model",
  "deleted": true
}