> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List fine tuning jobs

> Retrieve a list of all fine tuning jobs created by the user.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/inference.yml get /ai/fine_tuning/jobs
openapi: 3.1.0
info:
  title: Telnyx AI Inference API
  version: 2.0.0
  description: API for AI inference, including chat completions, fine-tuning, and models.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /ai/fine_tuning/jobs:
    get:
      tags:
        - Fine Tuning
      summary: List fine tuning jobs
      description: Retrieve a list of all fine tuning jobs created by the user.
      operationId: get_finetuningjob_public_finetuning_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJobsListData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

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

            const jobs = await client.ai.fineTuning.jobs.list();

            console.log(jobs.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            jobs = client.ai.fine_tuning.jobs.list()
            print(jobs.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tjobs, err := client.AI.FineTuning.Jobs.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", jobs.Data)\n}\n"
        - lang: Java
          source: |-
            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.JobListParams;
            import com.telnyx.sdk.models.ai.finetuning.jobs.JobListResponse;

            public final class Main {
                private Main() {}

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

                    JobListResponse jobs = client.ai().fineTuning().jobs().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            jobs = telnyx.ai.fine_tuning.jobs.list

            puts(jobs)
        - lang: PHP
          source: >-
            <?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 {
              $jobs = $client->ai->fineTuning->jobs->list();

              var_dump($jobs);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:fine-tuning:jobs list \
              --api-key 'My API Key'
components:
  schemas:
    FineTuningJobsListData:
      properties:
        data:
          items:
            $ref: '#/components/schemas/FineTuningJob'
          type: array
      type: object
      required:
        - data
      title: FineTuningJobListData
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    FineTuningJob:
      type: object
      title: FineTuningJob
      description: >-
        The `fine_tuning.job` object represents a fine-tuning job that has been
        created through the API.
      properties:
        id:
          type: string
          description: The name of the fine-tuned model that is being created.
        created_at:
          type: integer
          description: >-
            The Unix timestamp (in seconds) for when the fine-tuning job was
            created.
        finished_at:
          type:
            - integer
            - 'null'
          description: >-
            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:
          type: object
          description: The hyperparameters used for the fine-tuning job.
          properties:
            n_epochs:
              type: integer
              minimum: 1
              maximum: 10
              default: 3
              description: >-
                The number of epochs to train the model for. An epoch refers to
                one full cycle through the training dataset.
          required:
            - n_epochs
        model:
          type: string
          description: The base model that is being fine-tuned.
        organization_id:
          type: string
          description: The organization that owns the fine-tuning job.
        status:
          type: string
          description: The current status of the fine-tuning job.
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
        trained_tokens:
          type:
            - integer
            - 'null'
          description: >-
            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:
          type: string
          description: The storage bucket or object used for training.
      required:
        - created_at
        - finished_at
        - hyperparameters
        - id
        - model
        - organization_id
        - status
        - trained_tokens
        - training_file
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````