Get jobs

Answers one job: what it asked for, its status and tasks, its artifacts, its result and verdict, and whether it was published.

GET /v1/train/jobs/{id}

Addresshttps://api.hanzo.ai/v1/train/jobs/{id}
MethodGET
Operationget_train_jobs_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Answers one job: what it asked for, its status and tasks, its artifacts, its result and verdict, and whether it was published. A job of another org is not found, exactly as an unknown id is.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID names the job.

Response

StatusBodyMeaning
200train.Jobok
defaultproblem-detailsrefused

200 body — 78 fields.

FieldInTypeAlwaysDescription
adaptationbodytrain.Adaptation—
adaptation.alphabodynumber (double)—Alpha is an adapter's scale.
adaptation.basisbodystring—Basis is a basis artifact, by sha256 or basis://<base>/<name>.
adaptation.chosebodytrain.Chose—
adaptation.chose.modebodystring—Mode is the mode the job runs.
adaptation.chose.whybodystring—Why says what decided it.
adaptation.modebodystring—Mode is full, readout (the head alone, over the frozen base), lora, qlora, basis or auto.
adaptation.rankbodyinteger (int64)—Rank is an adapter's rank, or how many of a basis's directions are used.
adaptation.residual_rankbodyinteger (int64)—ResidualRank is the rank of an orthonormal residual learned beside a basis's coefficients; 0 trains the coefficients alone.
adaptation.sourcesbodystring[]—Sources are lora artifacts (sha256) a basis is built from, in place of Basis.
adaptation.targetsbodystring[]—Targets are the modules an adapter or a basis attaches to.
artifactsbodytrain.artifact[]—Artifacts are its outputs.
artifacts[].createdbodyinteger (int64)—Created is when it was registered, unix seconds.
artifacts[].jobbodystring—Job is the job that produced it; empty for an upload.
artifacts[].kindbodystring—Kind is checkpoint, lora, capability, basis or merged, or dataset for an upload.
artifacts[].metabodyany—Meta describes it: its base and revision, its modules, a basis's address.
artifacts[].namebodystring—Name labels it.
artifacts[].sha256bodystring—SHA256 is the hex digest of its bytes, and its name in the object store.
artifacts[].sizebodyinteger (int64)—Size is its byte count.
artifacts[].statebodystring—State is pending until its bytes are read back, then stored; deleted once the org deleted it or it outlived its retention unpublished.
base_modelbodystring—
createdbodyinteger (int64)—Created, Started and Ended are unix seconds; 0 is not yet.
created_bybodystring—CreatedBy is the principal that created it.
datasetbodytrain.Dataset—
dataset.splitsbodyobject—Splits maps a role (train, validation) to the dataset's own split name.
dataset.splits.*bodystring—
dataset.uribodystring—URI names the data.
endedbodyinteger (int64)—
errorbodystring—Error says why a job failed or stopped.
evaluationbodytrain.Evaluation—
evaluation.suitesbodystring[]—Suites are the suites the job is meant to improve.
frombodystring—
idbodystring—ID names the job.
objectivebodytrain.Objective—
objective.lossbodystring—Loss is cross_entropy.
objective.termsbodytrain.Term[]—Terms are added to each row's loss.
objective.terms[].kindbodystring—Kind names the term.
objective.terms[].marginbodynumber (double)—Margin is a hinge's margin, in logits.
objective.terms[].weightbodynumber (double)—Weight scales it; 0 is off.
outputbodytrain.Output—
output.kindbodystring—Kind is checkpoint, lora, capability, basis or merged.
output.namebodystring—Name labels it.
projectbodystring—Project is the creator's project scope.
protectbodytrain.Protect—
protect.budgetbodytrain.Budget—
protect.budget.accuracybodynumber (double)—Accuracy is the largest accuracy drop allowed.
protect.budget.ecebodynumber (double)—ECE is the largest calibration-error rise allowed.
protect.capabilitiesbodystring[]—Capabilities are capability artifacts, by sha256.
protect.distillationbodyboolean—Distillation adds KL to the base's answers on a preservation set drawn from the suites.
protect.projectionbodytrain.Projection—
protect.projection.strengthbodynumber (double)—Strength is λ in [0, 1]; absent is 1, the whole of P g removed.
protect.suitesbodystring[]—Suites are capabilities the base already has, by suite.
publishedbodyany—Published is the publish record, once published.
resourcesbodytrain.Resources—
resources.budgetbodyinteger (int64)—Budget bounds what the job's compute costs, in US cents; 0 is none beyond the payer's balance.
resources.devicesbodystring[]—Devices are the accelerator kinds the job may run on — cuda, rocm, metal, vulkan, cpu; none named is any its base runs.
resources.machinesbodystring[]—Machines are the org's linked machines by name; the first leads.
resources.max_secondsbodyinteger (int64)—MaxSeconds bounds the device-seconds the job's tasks use together; 0 is none.
resources.stepsbodyinteger (int64)—Steps bounds optimizer steps; 0 runs the plan.
resultbodyany—Result is the lead's evaluation and verdict, once reported.
revisionbodystring—
startedbodyinteger (int64)—
statusbodystring—Status is queued, running, evaluating, succeeded, rejected, failed, cancelled or stopped.
tasksbodytrain.TaskView[]—Tasks are its units of execution.
tasks[].devicebodystring—Device is the accelerator class it runs on — gpu or cpu — and Devices how many.
tasks[].devicesbodyinteger (int64)—
tasks[].heldbodyinteger (int64)—
tasks[].hostbodystring—Host is the machine that claimed it.
tasks[].idbodystring—ID names the task.
tasks[].machinebodystring—Machine is the machine it was placed on, or empty for any.
tasks[].rolebodystring—Role is lead or join.
tasks[].secondsbodyinteger (int64)—Seconds are the device-seconds its reports metered, and Held those held for it.
tasks[].seenbodyinteger (int64)—Seen is its last report, unix seconds.
tasks[].statusbodystring—Status is open, claimed, done or lost.
usagebodytrain.Usage—
usage.cost_micro_usdbodyinteger (int64)—CostMicroUSD is what Seconds were charged, in micro-USD: 0 on the org's own machines.
usage.heldbodyinteger (int64)—Held are the device-seconds held beyond Seconds; 0 once it ended.
usage.secondsbodyinteger (int64)—Seconds are the device-seconds used.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.

import { Configuration, TrainApi } from 'hanzoai';

const api = new TrainApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTrainJobsById({ id: 'id' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TrainApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TrainApi(client).get_train_jobs_by_id(id='id')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TrainAPI.GetTrainJobsById(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, train_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = train_api::get_train_jobs_by_id(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TrainApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new TrainApi(client).getTrainJobsById();
curl https://api.hanzo.ai/v1/train/jobs/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP declares no tool for train — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.


Train API · All Hanzo APIs · Interactive reference

Was this page useful?