Documentation
Datasets
View .mdOpenAPI

Delete a dataset

DELETEhttps://weights.fyi/run/v1/datasets/{dataset_id}scope: submit
text
DELETE https://weights.fyi/run/v1/datasets/<dataset_id>
Authorization: Bearer <token>                    scope: submit
Available since
2026-10-08, with fine-tuning. Implemented 2026-10-09: the reservation released only once storage is clean, and 409 dataset_busy during an upload.
Answer time
synchronous: the file is removed from storage and the dataset marked deleted before the answer comes.

Deletes a dataset's file and marks it deleted: the rows are your data, and this is how you take them back. The record stays, with name, counts and digest, so the jobs that used it can say what they learned from; the file cannot come back. While an open training job uses it the answer is 409 dataset_in_use (the job may fetch it again after a move); finish or stop that job first. Otherwise it is deleted at once, whatever its status, and repeating is safe. Models and checkpoints it trained stay, with no call to delete them yet.

Since the merge of 2026-10-09 the dataset is first marked unavailable to new jobs, then its file and anything a failed upload left are removed, and only then is its reservation released; if storage does not answer (502 storage_unavailable) it stays marked and reserved until you send the delete again.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token. The token needs the submit scope, and the call counts against the token's request rate.
dataset_idpathyesThe dataset's identifier, ds_ followed by 24 hexadecimal characters.

Return value

200 OK with the dataset after the delete, as GET /v1/datasets/{dataset_id} shows it.

Errors

StatusCodeWhen it happensWhat to do
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks submit, or the account is suspended.Use a token with submit.
404dataset_not_foundThere is no such dataset in your account.Check the id.
409dataset_in_useA training job that uses the dataset is still open; jobs lists every job that used it.Wait for the open job to end, or stop it, then delete again.
409dataset_busyAn upload of this dataset is running (merged 2026-10-09).Wait for it to end, then delete.
502storage_unavailableStorage did not answer; the dataset keeps its reservation (merged 2026-10-09).Send the delete again later.
429rate_limitedThe token sends work faster than its request rate.Wait the Retry-After seconds and send again.

Examples

sh
curl -s -X DELETE https://weights.fyi/run/v1/datasets/DATASET_ID -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{
  "dataset_id": "ds_3c5312a9a04e76a477cec491",
  "name": "bad",
  "format": "laya-page-role/jsonl",
  "base_model": "laya-page-role-base",
  "labels": ["detail", "listing", "landing", "not_vacancy", "unresolved"],
  "status": "deleted",
  "error": "unknown_label",
  "rows": null,
  "train_rows": null,
  "validation_rows": null,
  "bytes": null,
  "sha256": null,
  "created_at": "2026-10-09T08:28:09.830Z",
  "ready_at": null,
  "jobs": []
}

History

  • 2026-10-08: live with fine-tuning.
  • 2026-10-09 (merged): reservation released once storage is clean; 409 dataset_busy; a refused delete can be sent again.

See also

GET /v1/datasets, Fine-tune a model.