Skip to main content
Everything you create stays in your workspace until you remove it. This page collects the cleanup path for each resource type in one place. It covers how to list what you have, how to delete a single resource, and how to delete in bulk. Each example assumes an initialized client. See Get started with the SDK.

Deletion methods

Delete fine-tuning jobs and projects over REST. See Delete fine-tuning jobs and projects for a worked example.
Deletion is permanent for every resource in the table. Nothing is moved to a recoverable state first, and a deleted resource cannot be restored.

List your resources

Begin by listing the resource type you intend to remove. The list methods differ in shape. Some return a list directly. Others return a response object with the results under data.
client.tools.list(), client.files.list(), client.data_jobs.list(), and client.projects.list() accept paging arguments. When a workspace holds more resources than one page returns, increase limit or request successive pages with offset.
client.data_jobs.list() also filters by job_type and sorts with sort_by and sort_order. See Manage data jobs.

Delete a single resource

Each delete method takes the resource ID.
Deleting a vector database removes the database and everything indexed in it. To remove one document and keep the database, delete the file instead. See Manage vector databases.

Delete in bulk

To remove several resources at once, filter a list call to the resources you want to delete, then iterate over the result. This example removes every tool whose name starts with a test prefix.
Print the selection and confirm it before the delete loop runs. Deletion is permanent, and a filter that matches more than you expected cannot be undone.
Delete in dependency order when resources reference each other. Delete an agent before the tools it uses, and delete a vector database before the files that were ingested into it.

Cancel compared with delete

Cancel and delete are different operations on fine-tuning jobs, and only one of them frees the job from your list.
  • Cancel – stops a job that is queued or in progress. The job remains in your list with a cancelled status, and its record and artifacts are retained. Use client.fine_tuning.cancel(id).
  • Delete – removes the job record and its artifacts. A job in any state can be deleted, including one that finished or was cancelled.
Cancelling a job that has already reached a terminal state has no effect. To remove finished and cancelled jobs from a workspace, delete them. Data jobs follow the same split. client.data_jobs.cancel(data_job_id) stops an in-progress alignment run, and client.data_jobs.delete(data_job_id) removes the record.

Delete fine-tuning jobs and projects

Delete fine-tuning jobs and projects with a direct HTTP request to the REST endpoints. Deleting a project does not delete the fine-tuning jobs in it. The jobs are disassociated from the project and remain in your workspace. To remove them as well, delete the jobs first.
Both endpoints return 204 No Content on success. The deleted job or project no longer appears in client.fine_tuning.list() or client.projects.list(). To remove all finished fine-tuning jobs from a workspace, list them with the SDK and delete them over REST.
Last modified on September 14, 2026