Get a fine tuning job
Returns the details of a single fine-tuning job by its job_id, including its current status.
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_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/fine_tuning/jobs/{job_id} \
--header 'Authorization: Bearer <token>'{
"id": "string",
"created_at": 0,
"hyperparameters": {
"n_epochs": 3
},
"model": "string",
"organization_id": "string",
"status": "queued",
"training_file": "string",
"finished_at": null,
"trained_tokens": null
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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.
The name of the fine-tuned model that is being created.
The Unix timestamp (in seconds) for when the fine-tuning job was created.
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.
The hyperparameters used for the fine-tuning job.
Show child attributes
Show child attributes
The base model that is being fine-tuned.
The organization that owns the fine-tuning job.
The current status of the fine-tuning job.
queued, running, succeeded, failed, cancelled 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.
The storage bucket or object used for training.
Was this page helpful?
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_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/fine_tuning/jobs/{job_id} \
--header 'Authorization: Bearer <token>'{
"id": "string",
"created_at": 0,
"hyperparameters": {
"n_epochs": 3
},
"model": "string",
"organization_id": "string",
"status": "queued",
"training_file": "string",
"finished_at": null,
"trained_tokens": null
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}