Skip to main content
POST
/
fine_tuning
/
jobs
/
{fine_tuning_job_id}
/
cancel
Cancel fine-tuning job
curl --request POST \
  --url https://api.anyapi.ai/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "fine_tuning.job",
  "created_at": 123,
  "error": {
    "code": "<string>",
    "message": "<string>",
    "param": "<string>"
  },
  "fine_tuned_model": "<string>",
  "finished_at": 123,
  "hyperparameters": {
    "batch_size": "auto",
    "learning_rate_multiplier": "auto",
    "n_epochs": "auto"
  },
  "model": "<string>",
  "organization_id": "<string>",
  "result_files": [
    "<string>"
  ],
  "status": "validating_files",
  "trained_tokens": 123,
  "training_file": "<string>",
  "validation_file": "<string>",
  "integrations": [
    {
      "type": "wandb",
      "wandb": {
        "project": "<string>",
        "name": "<string>",
        "entity": "<string>",
        "tags": [
          "<string>"
        ]
      }
    }
  ],
  "seed": 123,
  "estimated_finish": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Get your API key from the dashboard.

Path Parameters

fine_tuning_job_id
string
required

The ID of the fine-tuning job to cancel

Response

Successful response

id
string
required

The object identifier

object
enum<string>
required

The object type, which is always 'fine_tuning.job'

Available options:
fine_tuning.job
created_at
integer
required

The Unix timestamp (in seconds) for when the fine-tuning job was created

fine_tuned_model
string | null
required

The name of the fine-tuned model that is being created

finished_at
integer | null
required

The Unix timestamp (in seconds) for when the fine-tuning job was finished

hyperparameters
object
required
model
string
required

The base model that is being fine-tuned

organization_id
string
required

The organization that owns the fine-tuning job

result_files
string[]
required

The compiled results file ID(s) for the fine-tuning job

status
enum<string>
required

The current status of the fine-tuning job

Available options:
validating_files,
queued,
running,
succeeded,
failed,
cancelled
trained_tokens
integer | null
required

The total number of billable tokens processed by this fine-tuning job

training_file
string
required

The file ID used for training

validation_file
string | null
required

The file ID used for validation

error
object
integrations
object[]

A list of integrations enabled for this fine-tuning job

seed
integer

The seed used for the fine-tuning job

estimated_finish
integer | null

The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish

I