Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Cancel fine-tuning

POST
/fine_tuning/jobs/{fine_tuning_job_id}/cancel

Immediately cancel a fine-tune job.

Cancel fine-tuning

curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \
  -H "Authorization: Bearer $OPENAI_API_KEY"
Response example
{
  "object": "fine_tuning.job",
  "id": "ftjob-abc123",
  "model": "gpt-4o-mini-2024-07-18",
  "created_at": 1721764800,
  "fine_tuned_model": null,
  "organization_id": "org-123",
  "result_files": [],
  "status": "cancelled",
  "validation_file": "file-abc123",
  "training_file": "file-abc123",
  "error": {},
  "finished_at": null,
  "seed": null,
  "trained_tokens": null,
  "hyperparameters": null
}
Path Parameters
fine_tuning_job_id: string

The ID of the fine-tuning job to cancel.

Returns
FineTuningJob object { id, created_at, error, 16 more }

The fine_tuning.job object represents a fine-tuning job that has been created through the API.

Returns Examples
Response example
{
  "object": "fine_tuning.job",
  "id": "ftjob-abc123",
  "model": "gpt-4o-mini-2024-07-18",
  "created_at": 1721764800,
  "fine_tuned_model": null,
  "organization_id": "org-123",
  "result_files": [],
  "status": "cancelled",
  "validation_file": "file-abc123",
  "training_file": "file-abc123",
  "error": {},
  "finished_at": null,
  "seed": null,
  "trained_tokens": null,
  "hyperparameters": null
}