Get the model's state
GET https://weights.fyi/run/v1/endpoint
Authorization: Bearer <token> scope: read- Available since
- 2026-10-08, when the service went live on weights.fyi/run;
message,queued_work_preservedandrecovery_actionsince 2026-10-10. - Answer time
- synchronous: the state is read from the service's last look at the model, which it renews every 5 s.
Tells you the page classifier's state now, since when, and how long until it is expected ready; the LLM endpoints have their own call. You never need it to send page work, which is queued and starts the model by itself; it is for deciding when to send, telling your own users what to expect, and knowing why a job waits. What the states mean, how long a start takes (2 min 12 s to 2 min 31 s on hardware that served the model before, 2026-10-08) and what a move looks like (served again 240 s after it began in the live drill of 2026-10-08) is in Jobs, progress and results.
expected_ready_seconds counts down to ready while the model starts or moves; while it is stopped or stopping it is how long a start typically takes; it is null while ready or paused, or with no estimate. It guides polling, and is not a promise. The call takes no parameters.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and a token with read. |
Return value
200 OK with the model's state.
| Field | Meaning |
|---|---|
model | The model this state is about, laya-page-role. |
state | One of the six codes above. |
since | When the model entered this state, UTC. |
message, queued_work_preserved, recovery_action | The state in a sentence (for example "Finding replacement capacity. Your queued work will resume automatically." while moving, "The model is asleep. Submitting work will start it." while stopped, null while ready); true while the model starts or moves, to say queued work is kept; and poll_job in those states, to say the thing to do is keep polling your job, not send it again. |
expected_ready_seconds | The estimate in seconds until the model is ready, while it is not ready; null while it is ready or paused, or when there is no estimate. |
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. |
Examples
curl -s https://weights.fyi/run/v1/endpoint -H "Authorization: Bearer $WEIGHTS_API_KEY"While the model is stopped:
{
"model": "laya-page-role",
"state": "asleep",
"since": "2026-10-09T08:28:09.534Z",
"expected_ready_seconds": null
}Patterns
Waiting for the model before a time-critical batch
Ask for the model with POST /v1/endpoint/warm, poll this call every 5 s until ready, and send. Keep the gap under the 144 s the model stays ready without work, or it stops again; that time costs nothing either way.
History
- 2026-10-08: live, the state in the model's words, not the service's internal ones.
- 2026-10-10 implementation review:
message,queued_work_preserved,recovery_action. - 2026-11-16: the pattern no longer says the time the model stays ready is charged; it has been free since 2026-10-10.
See also
GET /v1/jobs/{job_id}, whose model_state carries the same fields.