From 62f42f2106eaeef2f0d782f5dde1d8a73316a864 Mon Sep 17 00:00:00 2001 From: Artem Chumachenko Date: Mon, 27 Apr 2026 11:40:04 +0200 Subject: [PATCH 1/4] Add GET /v1/fine-tunes/{id}/metrics endpoint --- openapi.yaml | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 0b20862..d201845 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3332,6 +3332,106 @@ paths: description: Invalid request parameters. '404': description: Fine-tune ID not found. + /fine-tunes/{id}/metrics: + get: + tags: ['Fine-tuning'] + summary: Get metrics + description: > + Retrieves recorded training metrics for a fine-tuning job in chronological order. + All filter fields are optional — omit the body or send `{}` to retrieve all rows. + x-codeSamples: + - lang: Shell + label: cURL + source: | + curl -X GET "https://api.together.xyz/v1/fine-tunes/ft-id/metrics" \ + -H "Authorization: Bearer $TOGETHER_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "global_step_from": 0, + "global_step_to": 500 + }' + parameters: + - name: id + in: path + required: true + schema: + description: Fine-tune job ID. A string that starts with `ft-`. + type: string + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + global_step_from: + type: integer + format: int64 + description: Return only rows with global_step >= this value. + example: 0 + global_step_to: + type: integer + format: int64 + description: Return only rows with global_step <= this value. + example: 500 + logged_at_from: + type: string + format: date-time + description: Return only rows logged at or after this ISO-8601 timestamp. + example: "2024-01-01T00:00:00Z" + logged_at_to: + type: string + format: date-time + description: Return only rows logged at or before this ISO-8601 timestamp. + example: "2024-01-01T12:00:00Z" + responses: + '200': + description: List of metrics snapshots in chronological order. + content: + application/json: + schema: + type: object + properties: + metrics: + type: array + items: + type: object + properties: + job_id: + type: string + description: Fine-tune job ID. + example: ft-abc123 + global_step: + type: integer + format: int64 + description: Training step at which this snapshot was recorded. + example: 100 + is_eval: + type: boolean + description: Whether this was recorded during an evaluation step. + example: false + run_started_at: + type: string + format: date-time + description: When the training run started. + example: "2024-01-01T00:00:00Z" + logged_at: + type: string + format: date-time + description: When this row was logged. + example: "2024-01-01T01:00:00Z" + metrics: + type: object + additionalProperties: + type: number + description: Raw scalar metrics. + example: + train/loss: 0.42 + train/learning_rate: 0.00001 + '400': + description: Invalid request — bad JSON body or missing job ID. + '500': + description: Internal server error — failed to retrieve metrics. /fine-tunes/models/supported: get: tags: ['Fine-tuning'] From 5706fcb6740db12f5b6d6acf3495e56724c446fe Mon Sep 17 00:00:00 2001 From: Artem Chumachenko Date: Mon, 27 Apr 2026 13:27:14 +0200 Subject: [PATCH 2/4] Add 404 response to GET /v1/fine-tunes/{id}/metrics --- openapi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index d201845..e32a61b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3430,6 +3430,8 @@ paths: train/learning_rate: 0.00001 '400': description: Invalid request — bad JSON body or missing job ID. + '404': + description: Fine-tune job not found. '500': description: Internal server error — failed to retrieve metrics. /fine-tunes/models/supported: From 0d8c7c2385e34228bb2e112f51c77f2cdb24f588 Mon Sep 17 00:00:00 2001 From: Artem Chumachenko Date: Mon, 27 Apr 2026 13:31:27 +0200 Subject: [PATCH 3/4] Fix metrics response example and cURL sample --- openapi.yaml | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index e32a61b..45c4ad9 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3396,38 +3396,17 @@ paths: type: array items: type: object - properties: - job_id: - type: string - description: Fine-tune job ID. - example: ft-abc123 - global_step: - type: integer - format: int64 - description: Training step at which this snapshot was recorded. - example: 100 - is_eval: - type: boolean - description: Whether this was recorded during an evaluation step. - example: false - run_started_at: - type: string - format: date-time - description: When the training run started. - example: "2024-01-01T00:00:00Z" - logged_at: - type: string - format: date-time - description: When this row was logged. - example: "2024-01-01T01:00:00Z" - metrics: - type: object - additionalProperties: - type: number - description: Raw scalar metrics. - example: - train/loss: 0.42 - train/learning_rate: 0.00001 + additionalProperties: + type: number + description: A flat dictionary of scalar metric values. + example: + metrics: + - train/loss: 0.5 + train/learning_rate: 0.0001 + train/global_step: 7 + - train/loss: 0.45 + train/learning_rate: 0.00009 + train/global_step: 14 '400': description: Invalid request — bad JSON body or missing job ID. '404': From c235ac3a1d38ca73852d4440e1e6e1d544b6a1ee Mon Sep 17 00:00:00 2001 From: Artem Chumachenko Date: Mon, 27 Apr 2026 13:40:40 +0200 Subject: [PATCH 4/4] Replace 'rows' with 'metrics' in descriptions to reduce internal terminology leakage --- openapi.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 45c4ad9..f1f0b7d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3338,7 +3338,7 @@ paths: summary: Get metrics description: > Retrieves recorded training metrics for a fine-tuning job in chronological order. - All filter fields are optional — omit the body or send `{}` to retrieve all rows. + All filter fields are optional — omit the body or send `{}` to retrieve all metrics. x-codeSamples: - lang: Shell label: cURL @@ -3367,22 +3367,22 @@ paths: global_step_from: type: integer format: int64 - description: Return only rows with global_step >= this value. + description: Return only metrics with global_step >= this value. example: 0 global_step_to: type: integer format: int64 - description: Return only rows with global_step <= this value. + description: Return only metrics with global_step <= this value. example: 500 logged_at_from: type: string format: date-time - description: Return only rows logged at or after this ISO-8601 timestamp. + description: Return only metrics logged at or after this ISO-8601 timestamp. example: "2024-01-01T00:00:00Z" logged_at_to: type: string format: date-time - description: Return only rows logged at or before this ISO-8601 timestamp. + description: Return only metrics logged at or before this ISO-8601 timestamp. example: "2024-01-01T12:00:00Z" responses: '200':