Documentation
Jobs and results
View .mdOpenAPI

Get a job

GEThttps://weights.fyi/run/v1/jobs/{job_id}scope: read
text
GET https://weights.fyi/run/v1/jobs/<job_id>
Authorization: Bearer <token>                    scope: read
Available since
2026-10-08, when the service went live on weights.fyi/run, training jobs included. Merged 2026-10-09: waiting_for: "token_daily_cap". the recovery fields of model_state.
Answer time
synchronous: the answer reads the job as it stands and never waits for it to move. The job's state changes at most once every 5 s, so asking more often shows nothing new.

Returns one of your jobs as it stands: status, progress, the model's state, the cost so far and each run of the model it was served in. It is the call you poll; it does not count against your token's request rate. A page job, a training job and a measurement job answer in different words, all below; tell them apart by kind (absent, finetune, measure). What the states mean, and what a move to new hardware looks like, is in Jobs, progress and results.

A job's cost is the sum of its charges, posted as its results land (pages answered, or for a fine-tune the tokens trained), final once the job has ended (Prices and billing). Another account's job, a job id that does not exist, and a batch whose upload is still being read all answer 404 job_not_found.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token. The token needs the read scope. Reads are not counted against the token's request rate.
job_idpathyesThe job's identifier, job_ followed by 24 hexadecimal characters, as the call that made the job returned it.

Return value

200 OK with the job.

A page job

FieldMeaning
job_idThe job's identifier.
modelThe model the job runs, laya-page-role today.
service_classflex for a job made by POST /v1/classify, whose pages go before batch work, or batch for a job made by POST /v1/jobs.
statusQUEUED until a page is sent, RUNNING while pages are open, then SUCCEEDED when every page has an answer (some may have failed one by one), FAILED when every page failed, CANCELLED when you stopped it and some pages were never sent.
traceparentThe job's trace context: its trace and its root span. Link your own traces to it.
waiting_forWhy a job with pages to send is not moving: model (not ready yet), credit, or null when nothing holds it.
created_atWhen the job was made.
started_atWhen its first page was sent to the model, or null before that.
completed_atWhen its last open page was settled, or null while pages are open.
progress.totalHow many pages the job holds.
progress.done, progress.failed, progress.cancelledHow many pages have a result, failed, or were cancelled before they were sent.
progress.queued, progress.in_flightHow many pages wait to be sent, and how many the model is working on right now.
progress.pages_per_secondThe pages finished per second over the last rate_window_seconds, or null before the job started.
progress.eta_secondsThe seconds the open pages take at that speed; 0 when none are open, null when no speed is measured yet.
progress.rate_window_secondsThe window the speed is measured over, 60 s.
model_state.stateThe model's state now: asleep, waking_up, ready, going_to_sleep, moving or paused.
model_state.sinceWhen the model entered that state, or null when availability cannot currently be confirmed.
model_state.expected_ready_secondsWhile the model starts or moves, the service's estimate of the seconds until it is ready; otherwise null.
model_state.message, model_state.queued_work_preserved, model_state.recovery_actionThe state in a sentence ("Finding replacement capacity. Your queued work will resume automatically." while moving; null while ready). Queued work is preserved while starting, moving, or temporarily paused to check availability; poll_job means keep polling this job, not send it again. An availability check does not imply a move. The model's current state does not change a completed job's outcome.
cost.usd_microsThe job's charges so far in micro-dollars; null for a job admitted before prices per unit, charged by run of the model.
cost.finaltrue once the job has ended; until then the figure grows as results land.
cost.basisOne sentence saying how the cost is worked out.
cost.pages_counted or cost.training_tokens, cost.pricesThe pages charged so far (for a fine-tune, the training tokens), and the price per 1M the job was admitted at (usd_per_1m_pages or usd_per_1m_training_tokens).
runsOne entry for each run of the model the job was served in, oldest first: started_at (when the run was asked for), ended_at (when it stopped, null while it lasts), usd_micros (what the job was charged in it) and final (whether the run has ended).
scheduleOnly on a job made with a schedule, judged again at each read: state, eligible_to_wake (whether it may ask for the model to be started now), reason, not_before, until, latest_safe_start, optimal_hours_utc and window_progress; completed once the job has ended.

A training job

FieldMeaning
job_id, traceparent, created_at, started_at, completed_atAs for a page job.
kindfinetune.
modelThe base the job trains, such as laya-page-role-base.
datasetThe dataset it trains on, ds_ followed by 24 hexadecimal characters.
recipeThe recipe it follows, such as laya-page-role/v2.
optionsThe options in force: epochs, patience, seed and checkpoint_seconds, your choices over the recipe's defaults.
service_classbatch.
statusQUEUED, RUNNING, SUCCEEDED, FAILED or CANCELLED.
statequeued, preparing, training, moving, finishing or done, as described above.
state_textThe same in words for a person: Queued, Waiting for credit, Waiting for token spending limit to reset (merged 2026-10-09), Preparing, Training, Moving to new hardware, Finishing, and at the end Done, Failed or Cancelled.
waiting_forWhile the job is queued and not yet given to the model: credit, model, or token_daily_cap when its token reached its daily spend cap and the training stopped cleanly to wait for the next UTC day or a higher cap (merged 2026-10-09); otherwise null.
progress.epoch, progress.epochsThe last epoch the training reported, and how many the job runs at most.
progress.step, progress.steps_per_epochThe last step reported, and the steps in one epoch.
progress.pages_seen, progress.pages_per_secondThe training pages processed so far, and the recent speed.
progress.last_step_at, progress.last_step_age_secondsWhen the last step was reported, and how many seconds ago that was: the freshness of the figures above.
progress.bestThe epoch with the best validation macro-F1 so far and that score, or null before the first epoch ends.
progress.epochs_doneOne entry per finished epoch: epoch, its validation macro_f1, and improved, whether it beat every earlier epoch.
progress.last_checkpointThe last saved checkpoint: its step, when it was saved (at), and its age in seconds; null before the first.
progress.checkpoint_syncWhether checkpoints are reaching storage, which a move and the trained model depend on: failing (true after two failed saves in a row, also the log event checkpoint_sync_failing), failures_in_a_row and last_failed_at; null while no save has failed.
progress.resumes, progress.steps_lost_totalHow often the training resumed after a move, and how many steps had to be done again in all.
progress.load_secondsHow long loading your data and the base model took.
progress.total, progress.doneThe epochs to run and the epochs finished, so a list of jobs can show both kinds the same way; failed, cancelled, queued and in_flight are 0, and eta_seconds and rate_window_seconds are null, for a training job.
model_stateThe model's state, as for a page job.
costAs for a page job. Its own runs list, inside cost, lists the runs as the page-job cost rule sees them.
estimate_usd_microsThe estimate the job was admitted against, in micro-dollars; it is set aside from your available credit while the job is open.
runsOne entry per stretch of training, oldest first: started_at, ended_at and usd_micros. A job that moved shows two.
errorThe code a failed job ended with, such as missing_group_id; otherwise null. Two concern storage: checkpoint_store_refused (the training could not save to storage, found before anything was loaded or trained) and model_not_saved (the training ran, but its best model never reached storage, so there is no model to list or download).
stop_reasonWhy the training stopped: epoch_limit (all epochs ran), validation_patience (patience epochs passed without a better score), cancelled, failed, and a few rarer words; null while it runs.
result_modelThe trained model's id, ft_ followed by the job's 24 hexadecimal characters, once there is one.
scheduleAs for a page job, when the job was made with one.

A measurement job

A job made by POST /v1/models/{model}/measure, which measures how fast a model serves.

FieldMeaning
job_id, traceparent, created_at, started_at, completed_at, model_state, runsAs for a page job.
kind, service_classmeasure, and batch.
modelThe model being measured.
statusQUEUED, RUNNING, SUCCEEDED, FAILED or CANCELLED.
state, state_textThe measurement's own phase while it is open, reconciling while interrupted work is being checked, done at the end; and the same in words for a person.
waiting_forWhile it is open and not yet with the model: credit or model; execution_reconciliation while interrupted work is checked; otherwise null.
cancel_requestedWhether a cancel was asked for.
askedThe request shape the measurement was asked for.
progressrungs (each finished load step), under_way, stop, placements and moves (how often it was placed and moved), validation; done counts finished rungs and total is null.
resultnull until there is one: streams, output_tokens_per_second, prompt_tokens_per_second, request_shape, evidence and stop_reason.
costusd_micros, final, work_hours, prices and basis: the job's own work at the hourly price it was admitted at; waiting and moving are not charged.
estimate_usd_micros, errorThe estimate it was admitted against, and the code a failed job ended with, or null.

Errors

StatusCodeWhen it happensWhat to do
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work (any more).Use a valid token.
403scope_required, account_suspendedThe token lacks read, or the account is suspended.Use a token with read; for a suspended account, talk to us.
404job_not_foundThe job does not exist, belongs to another account, or its upload is not complete yet.Check the id, and that you use a token of the account that made the job.

Examples

A five-page batch, finished, its run still open, from a test copy of the service (so its speed and zero cost are not live figures):

sh
curl -s https://weights.fyi/run/v1/jobs/JOB_ID -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{
  "job_id": "job_5e7c50ca2489d324a215b0ba",
  "model": "laya-page-role",
  "service_class": "batch",
  "status": "SUCCEEDED",
  "traceparent": "00-7a4dfea36c0049bd6c1e4f5d1d1087e7-5d25160c17fbf86e-01",
  "waiting_for": null,
  "created_at": "2026-10-09T08:28:09.800Z",
  "started_at": "2026-10-09T08:28:09.801Z",
  "completed_at": "2026-10-09T08:28:09.803Z",
  "progress": {"total": 5, "done": 5, "failed": 0, "cancelled": 0, "queued": 0, "in_flight": 0,
               "pages_per_second": 2500.0, "eta_seconds": 0.0, "rate_window_seconds": 60.0},
  "model_state": {"state": "ready", "since": "2026-10-09T08:28:09.790Z", "expected_ready_seconds": null},
  "cost": {"usd_micros": 5, "final": true, "pages_counted": 2, "prices": {"usd_per_1m_pages": 2.288525},
           "basis": "the sum of the job's charges so far, each posted as its results landed, at the prices it was admitted at"},
  "runs": [{"started_at": "2026-10-09T08:28:09.790Z", "ended_at": null, "usd_micros": 5, "final": false}]
}

Patterns

Polling a job

The answer carries no Retry-After, and the state is read every 5 s, so poll no faster; while the model starts, expected_ready_seconds says how long a pause can be. Bound the loop with a deadline of your own, here DEADLINE_SECONDS:

sh
deadline=$(( $(date +%s) + DEADLINE_SECONDS ))   # how long this job is worth waiting for
while [ "$(date +%s)" -lt "$deadline" ]; do
  status=$(curl -s https://weights.fyi/run/v1/jobs/JOB_ID -H "Authorization: Bearer $WEIGHTS_API_KEY" | jq -r .status)
  case "$status" in SUCCEEDED|FAILED|CANCELLED) break ;; esac
  sleep 5
done

Read results as soon as the status is final. The final cost follows 144 s after the last page plus the model's stop, when no other work arrives. After a long pause the far end may have closed the connection; open a new one.

History

  • 2026-10-08: live with progress, model_state, cost and waiting_for; runs added at 15:47 UTC, before the first live run; training jobs in training words.
  • 2026-10-09 (merged): waiting_for: "token_daily_cap".
  • 2026-10-10 implementation review: message, queued_work_preserved, recovery_action; the panel says "Finding replacement capacity" while the model moves.
  • 2026-11-16: documented measurement jobs and the schedule verdict.

See also

GET /v1/jobs/{job_id}/results, GET /v1/jobs, DELETE /v1/jobs/{job_id}, GET /v1/jobs/{job_id}/logs, Fine-tune a model.