Skip to main content
POST
/
ai
/
fine_tuning
/
jobs
/
{job_id}
/
cancel
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const fineTuningJob = await client.ai.fineTuning.jobs.cancel('job_id');

console.log(fineTuningJob.id);
{
  "id": "<string>",
  "created_at": 123,
  "finished_at": 123,
  "hyperparameters": {
    "n_epochs": 3
  },
  "model": "<string>",
  "organization_id": "<string>",
  "status": "queued",
  "trained_tokens": 123,
  "training_file": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

job_id
string
required

Response

Successful Response

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

id
string
required

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

created_at
integer
required

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

finished_at
integer | null
required

The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.

hyperparameters
object
required

The hyperparameters used for the fine-tuning job.

model
string
required

The base model that is being fine-tuned.

organization_id
string
required

The organization that owns the fine-tuning job.

status
enum<string>
required

The current status of the fine-tuning job.

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

The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.

training_file
string
required

The storage bucket or object used for training.