# Checkpoints

## List fine-tuning checkpoints

`fine_tuning.jobs.checkpoints.list(fine_tuning_job_id, **kwargs) -> CursorPage<FineTuningJobCheckpoint>`

**get** `/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints`

List checkpoints for a fine-tuning job.

### Parameters

- `fine_tuning_job_id: String`

- `after: String`

  Identifier for the last checkpoint ID from the previous pagination request.

- `limit: Integer`

  Number of checkpoints to retrieve.

### Returns

- `class FineTuningJobCheckpoint`

  The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.

  - `id: String`

    The checkpoint identifier, which can be referenced in the API endpoints.

  - `created_at: Integer`

    The Unix timestamp (in seconds) for when the checkpoint was created.

  - `fine_tuned_model_checkpoint: String`

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

  - `fine_tuning_job_id: String`

    The name of the fine-tuning job that this checkpoint was created from.

  - `metrics: { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more}`

    Metrics at the step number during the fine-tuning job.

    - `full_valid_loss: Float`

    - `full_valid_mean_token_accuracy: Float`

    - `step: Float`

    - `train_loss: Float`

    - `train_mean_token_accuracy: Float`

    - `valid_loss: Float`

    - `valid_mean_token_accuracy: Float`

  - `object: :"fine_tuning.job.checkpoint"`

    The object type, which is always "fine_tuning.job.checkpoint".

    - `:"fine_tuning.job.checkpoint"`

  - `step_number: Integer`

    The step number that the checkpoint was created at.

### Example

```ruby
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

page = openai.fine_tuning.jobs.checkpoints.list("ft-AF1WoRqd3aJAHsqc9NY7iL8F")

puts(page)
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "fine_tuned_model_checkpoint": "fine_tuned_model_checkpoint",
      "fine_tuning_job_id": "fine_tuning_job_id",
      "metrics": {
        "full_valid_loss": 0,
        "full_valid_mean_token_accuracy": 0,
        "step": 0,
        "train_loss": 0,
        "train_mean_token_accuracy": 0,
        "valid_loss": 0,
        "valid_mean_token_accuracy": 0
      },
      "object": "fine_tuning.job.checkpoint",
      "step_number": 0
    }
  ],
  "has_more": true,
  "object": "list",
  "first_id": "first_id",
  "last_id": "last_id"
}
```

## Domain Types

### Fine Tuning Job Checkpoint

- `class FineTuningJobCheckpoint`

  The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.

  - `id: String`

    The checkpoint identifier, which can be referenced in the API endpoints.

  - `created_at: Integer`

    The Unix timestamp (in seconds) for when the checkpoint was created.

  - `fine_tuned_model_checkpoint: String`

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

  - `fine_tuning_job_id: String`

    The name of the fine-tuning job that this checkpoint was created from.

  - `metrics: { full_valid_loss, full_valid_mean_token_accuracy, step, 4 more}`

    Metrics at the step number during the fine-tuning job.

    - `full_valid_loss: Float`

    - `full_valid_mean_token_accuracy: Float`

    - `step: Float`

    - `train_loss: Float`

    - `train_mean_token_accuracy: Float`

    - `valid_loss: Float`

    - `valid_mean_token_accuracy: Float`

  - `object: :"fine_tuning.job.checkpoint"`

    The object type, which is always "fine_tuning.job.checkpoint".

    - `:"fine_tuning.job.checkpoint"`

  - `step_number: Integer`

    The step number that the checkpoint was created at.
