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

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

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

console.log(fineTuningJob.id);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
fine_tuning_job = client.ai.fine_tuning.jobs.retrieve(
"job_id",
)
print(fine_tuning_job.id)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
fineTuningJob, err := client.AI.FineTuning.Jobs.Get(context.TODO(), "job_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", fineTuningJob.ID)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.finetuning.jobs.FineTuningJob;
import com.telnyx.sdk.models.ai.finetuning.jobs.JobRetrieveParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

FineTuningJob fineTuningJob = client.ai().fineTuning().jobs().retrieve("job_id");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

fine_tuning_job = telnyx.ai.fine_tuning.jobs.retrieve("job_id")

puts(fine_tuning_job)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$fineTuningJob = $client->ai->fineTuning->jobs->retrieve('job_id');

var_dump($fineTuningJob);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx ai:fine-tuning:jobs retrieve \
--api-key 'My API Key' \
--job-id job_id
curl --request GET \
--url https://api.telnyx.com/v2/ai/fine_tuning/jobs/{job_id} \
--header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "created_at": 123,
  "finished_at": 123,
  "hyperparameters": {
    "n_epochs": 3
  },
  "model": "<string>",
  "organization_id": "<string>",
  "trained_tokens": 123,
  "training_file": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<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

Unique identifier of the job.

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.