curl "https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/your-job-id/metrics?kind=train&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "your-job-id"
response = requests.get(
f"https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/{job_id}/metrics",
headers={"Authorization": f"Bearer {api_key}"},
params={"kind": "train", "limit": 20}
)
print(response.json())
const jobId = 'your-job-id';
const params = new URLSearchParams({ kind: 'train', limit: '20' });
const response = await fetch(
`https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/${jobId}/metrics?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const data = await response.json();
console.log(data);
{
"object": "list",
"data": [
{
"id": "your-metric-id",
"created_at": 1765201323,
"kind": "train",
"step": 1000,
"metrics": {
"loss": 0.123,
"learning_rate": 0.0001
}
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"code": "invalid_cursor",
"message": "Invalid cursor",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "not_found",
"message": "Not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Fine-Tuning Service
List Job Metrics
Get per-step training and evaluation metrics for the job
GET
/
fine_tuning
/
jobs
/
{id}
/
metrics
curl "https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/your-job-id/metrics?kind=train&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "your-job-id"
response = requests.get(
f"https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/{job_id}/metrics",
headers={"Authorization": f"Bearer {api_key}"},
params={"kind": "train", "limit": 20}
)
print(response.json())
const jobId = 'your-job-id';
const params = new URLSearchParams({ kind: 'train', limit: '20' });
const response = await fetch(
`https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/${jobId}/metrics?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const data = await response.json();
console.log(data);
{
"object": "list",
"data": [
{
"id": "your-metric-id",
"created_at": 1765201323,
"kind": "train",
"step": 1000,
"metrics": {
"loss": 0.123,
"learning_rate": 0.0001
}
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"code": "invalid_cursor",
"message": "Invalid cursor",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "not_found",
"message": "Not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Requires version 1.1.5 or later of the Archetype platform.
Overview
Returns per-step training and evaluation metrics for the job (e.g. the loss curve). This list is cursor-paginated and is sorted newest-first. You can filter the list to a single series using thekind parameter.
Request
string
required
The fine-tuning job ID for whicch to return metrics. This is a TypeID-encoded identifier with
the
FineTuningJobId prefix.string
Filters the results to a single series:
train (per-step), eval (held-out passes), or train_summary
(end-of-run aggregate). Omit this parameter to return all metrics.string
Forward cursor: return points older than the one with this ID. Pass the
next_cursor of the previous page. Mutually exclusive with before.string
Backward cursor: return points newer than the one with this ID. Pass the
prev_cursor of the current page. Mutually exclusive with after.Response
Returns a page of metric datapoints.string
The object type of a list response. Always
list.array
The training/evaluation metric datapoints. Each datapoint is represented by a
FineTuningMetric record.Show FineTuningMetric
Show FineTuningMetric
A single fine-tuning metric.
string
required
A unique datapoint ID. Pass as the
after cursor to page.integer
required
The Unix timestamp (in seconds) at which the datapoint was created.
string
required
The series this datapoint belongs to:
train / eval / train_summary.integer
required
The training step at which the datapoint was logged.
object
required
The metrics logged at this step (e.g.
loss, learning_rate, eval_loss).boolean
Whether or not more datapoints exist beyond this page.
string
Cursor to continue in the direction of travel — pass it as
after when paging forward
(the default), or as before when the request used before. null when has_more is
false. v1.1.11+string
Cursor to step back the way this page was reached — pass it as
before after a forward page,
or as after after a backward one. null when the request carried no cursor.curl "https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/your-job-id/metrics?kind=train&limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
job_id = "your-job-id"
response = requests.get(
f"https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/{job_id}/metrics",
headers={"Authorization": f"Bearer {api_key}"},
params={"kind": "train", "limit": 20}
)
print(response.json())
const jobId = 'your-job-id';
const params = new URLSearchParams({ kind: 'train', limit: '20' });
const response = await fetch(
`https://api.u1.archetypeai.app/v0.6/fine_tuning/jobs/${jobId}/metrics?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const data = await response.json();
console.log(data);
{
"object": "list",
"data": [
{
"id": "your-metric-id",
"created_at": 1765201323,
"kind": "train",
"step": 1000,
"metrics": {
"loss": 0.123,
"learning_rate": 0.0001
}
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"code": "invalid_cursor",
"message": "Invalid cursor",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
{
"code": "not_found",
"message": "Not found",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
Was this page helpful?