Documentation
Fine-tuning
View .mdOpenAPI

Measure a model

POSThttps://weights.fyi/run/v1/models/{model}/measurescope: submit
text
POST https://weights.fyi/run/v1/models/<model>/measure
Authorization: Bearer <token>                    scope: submit
Available since
2026-10-10. The call is part of this service; it answers 404 model_not_measurable for every model unless a measurement runtime is configured for that model here.
Answer time
synchronous for the admission; the measurement itself is a job that runs for tens of minutes.

Measures a model that this service has a measurement runtime for, so it can be priced per token on a measured tariff. Most models never need it: a model you enrolled yourself, or one served at a declared price, already has its tariff (Prices and billing). The answer is a job of kind measure: it doubles the streams against the model from one up to the model's configured limit, stops where a doubling no longer adds measurable output or at that limit, and says which (result.stop_reason: no_gain or configured_cap), measures how fast it reads prompts there, and records the model's streams, speed and card times. The figures become the model's prices per 1M tokens once the service's operator accepts them; a model already measured can be measured again, and the earlier figures are kept. When validation pages are configured it then runs them as decision calls.

The measurement is the one job charged by time: for the time the job itself works, at the hourly price the job is admitted at, posted as each call lands. Waiting for the model and a move to new hardware are not charged; after a move the job resumes from its last finished step and pays for the redo only past what it had already paid.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token. The token needs the submit scope.
modelpathyesThe model's identifier, as the service lists it.

An optional JSON body fixes this measurement's own shape; each field left out takes the service's setting.

FieldMeaning
prompt_wordsPrompt length per call, in words.
calls_per_streamCalls per stream per step.
hoursHours of work: sets the estimate and the time limit.

Return value

201 Created with the job, and Location: /run/v1/jobs/<job_id>. Follow it with GET /v1/jobs/{job_id}: its progress.rungs list each finished step, result the figures once measured, cost the hours of work and what they cost.

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 submit, or the account is suspended.Use a token with submit.
404model_not_measurableNo measurement runtime is configured for this model on this service; the answer is the same for an unknown model.Check the identifier; a model with a declared tariff needs no measurement.
409measure_in_progressA measurement of the model is open.Wait for it.
402measure_not_covered, token_daily_capYour credit, or the token's daily cap, does not cover the estimate.Add credit, or raise the cap.
400unknown_fields, invalid_prompt_words, invalid_calls_per_stream, invalid_hoursA body field is unknown or out of range.Fix the body.

Examples

sh
curl -s -X POST https://weights.fyi/run/v1/models/MODEL_ID/measure -H "Authorization: Bearer $WEIGHTS_API_KEY"
json
{
  "job_id": "job_4b1d0c2e9a7f3e5d6c8b1a20",
  "kind": "measure",
  "model": "MODEL_ID",
  "status": "QUEUED",
  "state": "queued",
  "prices": {"usd_per_hour": 1.8},
  "estimate": {"usd_micros": 540000, "basis": "an estimate of the hours of work a measurement takes, at the hourly price; the charge is the job's own work as it lands"}
}

History

  • 2026-10-10: built.
  • 2026-10-11: a measured model can be measured again (no more 409 model_already_measured); the figures are prices only once the operator accepts them; the result says why the ladder stopped; the optional body.
  • 2026-11-16: the stale "not deployed yet" wording is gone; which models are measurable is stated instead.

See also

GET /v1/jobs/{job_id}, GET /v1/usage, Prices.