Skip to content
Hayonix

API reference · Fine-tuning

A job's training metrics, one point per step in step order (chart-ready)

GET/v1/fine-tunes/{fine_tune_id}/metrics
API keyfine_tune_job:readProjectPaginated
TypeScript
client.fineTuning.listMetrics()
Python
client.fine_tuning.list_metrics()
CLI
hayonix fine-tunes metrics

Up to 200 points per page by default. While the job trains, poll with after_step set to the last step you have to get only new points.

Project API key (Authorization: Bearer sk_…), or a console session. Requires the fine_tune_job:read permission (a key's scope, or a role that includes it).

Examples

The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.

curl -sS "$API_BASE_URL/fine-tunes/ftj_01jc5zq4m8k3v6x9t2w7r0b1e4/metrics" \
  -H "Authorization: Bearer $API_KEY"

Request

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Path parameters

  • fine_tune_idstringrequired

    ID of the fine-tuning job

    ID with prefix ftj_

Query parameters

  • limitinteger

    1–200, default 50

    1–200

  • cursorstring

    `next_cursor` of the previous page

    up to 200 characters

  • after_stepinteger | null

    Only points after this step (polling)

    at least -1

Response

200 a page of results — A page of metric points

  • The items of this page.

    Show 9 fields of data
    • objectstringrequired

      Always `fine_tune_metric_point`: the type of this object

      One offine_tune_metric_point

    • stepintegerrequired

      Optimizer step the values were recorded at

    • epochnumber | nullrequired

      Epoch at this step, fractional; null when not reported

    • train_lossnumber | nullrequired

      Training loss; null when not reported at this step

    • eval_lossnumber | nullrequired

      Loss on the validation file; null at steps without an evaluation

    • learning_ratenumber | nullrequired

      Learning rate at this step; null when not reported

    • grad_normnumber | nullrequired

      Gradient norm before clipping; null when not reported

    • valuesobjectrequired

      Every metric at this step (preference training adds reward metrics)

    • recorded_atstring (date-time)required

      Time recorded (ISO 8601, UTC)

  • next_cursorstring | nullrequired

    Pass as `cursor` for the next page; null on the last page.

Example response
Example response
{
  "data": [
    {
      "object": "fine_tune_metric_point",
      "step": 1,
      "epoch": 1.5,
      "train_loss": 1.5,
      "eval_loss": 1.5,
      "learning_rate": 1.5,
      "grad_norm": 1.5,
      "values": {},
      "recorded_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "next_cursor": "string"
}

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
404not_found_errorNo such resource in this project (an ID from another project is answered the same way).
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.