Get a job
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 ofmodel_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
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and your token. The token needs the read scope. Reads are not counted against the token's request rate. |
job_id | path | yes | The 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
| Field | Meaning |
|---|---|
job_id | The job's identifier. |
model | The model the job runs, laya-page-role today. |
service_class | flex for a job made by POST /v1/classify, whose pages go before batch work, or batch for a job made by POST /v1/jobs. |
status | QUEUED 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. |
traceparent | The job's trace context: its trace and its root span. Link your own traces to it. |
waiting_for | Why a job with pages to send is not moving: model (not ready yet), credit, or null when nothing holds it. |
created_at | When the job was made. |
started_at | When its first page was sent to the model, or null before that. |
completed_at | When its last open page was settled, or null while pages are open. |
progress.total | How many pages the job holds. |
progress.done, progress.failed, progress.cancelled | How many pages have a result, failed, or were cancelled before they were sent. |
progress.queued, progress.in_flight | How many pages wait to be sent, and how many the model is working on right now. |
progress.pages_per_second | The pages finished per second over the last rate_window_seconds, or null before the job started. |
progress.eta_seconds | The seconds the open pages take at that speed; 0 when none are open, null when no speed is measured yet. |
progress.rate_window_seconds | The window the speed is measured over, 60 s. |
model_state.state | The model's state now: asleep, waking_up, ready, going_to_sleep, moving or paused. |
model_state.since | When the model entered that state, or null when availability cannot currently be confirmed. |
model_state.expected_ready_seconds | While 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_action | The 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_micros | The job's charges so far in micro-dollars; null for a job admitted before prices per unit, charged by run of the model. |
cost.final | true once the job has ended; until then the figure grows as results land. |
cost.basis | One sentence saying how the cost is worked out. |
cost.pages_counted or cost.training_tokens, cost.prices | The 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). |
runs | One 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). |
schedule | Only 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
| Field | Meaning |
|---|---|
job_id, traceparent, created_at, started_at, completed_at | As for a page job. |
kind | finetune. |
model | The base the job trains, such as laya-page-role-base. |
dataset | The dataset it trains on, ds_ followed by 24 hexadecimal characters. |
recipe | The recipe it follows, such as laya-page-role/v2. |
options | The options in force: epochs, patience, seed and checkpoint_seconds, your choices over the recipe's defaults. |
service_class | batch. |
status | QUEUED, RUNNING, SUCCEEDED, FAILED or CANCELLED. |
state | queued, preparing, training, moving, finishing or done, as described above. |
state_text | The 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_for | While 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.epochs | The last epoch the training reported, and how many the job runs at most. |
progress.step, progress.steps_per_epoch | The last step reported, and the steps in one epoch. |
progress.pages_seen, progress.pages_per_second | The training pages processed so far, and the recent speed. |
progress.last_step_at, progress.last_step_age_seconds | When the last step was reported, and how many seconds ago that was: the freshness of the figures above. |
progress.best | The epoch with the best validation macro-F1 so far and that score, or null before the first epoch ends. |
progress.epochs_done | One entry per finished epoch: epoch, its validation macro_f1, and improved, whether it beat every earlier epoch. |
progress.last_checkpoint | The last saved checkpoint: its step, when it was saved (at), and its age in seconds; null before the first. |
progress.checkpoint_sync | Whether 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_total | How often the training resumed after a move, and how many steps had to be done again in all. |
progress.load_seconds | How long loading your data and the base model took. |
progress.total, progress.done | The 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_state | The model's state, as for a page job. |
cost | As for a page job. Its own runs list, inside cost, lists the runs as the page-job cost rule sees them. |
estimate_usd_micros | The estimate the job was admitted against, in micro-dollars; it is set aside from your available credit while the job is open. |
runs | One entry per stretch of training, oldest first: started_at, ended_at and usd_micros. A job that moved shows two. |
error | The 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_reason | Why 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_model | The trained model's id, ft_ followed by the job's 24 hexadecimal characters, once there is one. |
schedule | As 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.
| Field | Meaning |
|---|---|
job_id, traceparent, created_at, started_at, completed_at, model_state, runs | As for a page job. |
kind, service_class | measure, and batch. |
model | The model being measured. |
status | QUEUED, RUNNING, SUCCEEDED, FAILED or CANCELLED. |
state, state_text | The 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_for | While it is open and not yet with the model: credit or model; execution_reconciliation while interrupted work is checked; otherwise null. |
cancel_requested | Whether a cancel was asked for. |
asked | The request shape the measurement was asked for. |
progress | rungs (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. |
result | null until there is one: streams, output_tokens_per_second, prompt_tokens_per_second, request_shape, evidence and stop_reason. |
cost | usd_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, error | The estimate it was admitted against, and the code a failed job ended with, or null. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
401 | unauthorized, invalid_token, token_revoked, token_expired | No token, or one that does not work (any more). | Use a valid token. |
403 | scope_required, account_suspended | The token lacks read, or the account is suspended. | Use a token with read; for a suspended account, talk to us. |
404 | job_not_found | The 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):
curl -s https://weights.fyi/run/v1/jobs/JOB_ID -H "Authorization: Bearer $WEIGHTS_API_KEY"{
"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:
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
doneRead 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,costandwaiting_for;runsadded 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
scheduleverdict.
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.