Documentation
Fine-tuning
View .mdOpenAPI

Download a trained model

GEThttps://weights.fyi/run/v1/jobs/{job_id}/model.safetensorsscope: read
text
GET https://weights.fyi/run/v1/jobs/<job_id>/model.safetensors
Authorization: Bearer <token>                    scope: read
Available since
2026-10-10 implementation review: included in this build; see What is live for deployment status. Running the model on the service is not available yet; see Bring your own model.
Answer time
the file is fetched from storage and checked against its digest before the first byte is sent, so the answer starts once the whole file is checked; then it streams.

Downloads the weights a training job made: the best epoch's checkpoint, in the safetensors format, as one file. Until the service can run your fine-tuned model itself, this is how you use it: you take the weights to wherever you run models and load them with the base model's configuration and tokenizer, because the file holds weights only. The job's results tell you the file's path and its SHA-256 before you download it (model.artifact in GET /v1/jobs/{job_id}/results).

The service checks the file before it sends it. It fetches the weights from storage, computes their SHA-256, and sends them only when that matches the digest recorded when the training saved the model; the header X-Content-SHA256 repeats it, so you can check your copy the same way. If the stored file does not match, nothing is sent and the answer is a 502. You never see where the file is stored or any credential for that storage. Downloads are bounded, because each one holds a copy of the file on the service while it is sent: two at a time for the whole service, each at most 2 GiB. A third download while two are running is refused with 429 artifact_download_busy and a Retry-After; nothing is lost by waiting and asking again. A job that has not made a model yet, because it is still training, failed before its first epoch, or is not a training job, answers 409 model_artifact_not_ready.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and your token, with the read scope.
job_idpathyesThe training job's identifier, job_ and 24 hexadecimal characters.

Return value

200 OK with the file as application/octet-stream, sent in chunks, with these headers:

HeaderMeaning
Content-Dispositionattachment; filename="model.safetensors".
X-Content-SHA256The SHA-256 of the file, checked by the service before sending; the same as model.artifact.sha256 in the job's results.

Errors

StatusCodeWhen it happensWhat to do
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work.Use a valid token.
403scope_requiredThe token lacks read.Use a token with read.
404job_not_foundNo such job in your account.Check the identifier.
404not_configuredFine-tuning is not switched on for this service.None.
409model_artifact_not_readyThe job has no model yet.Wait for the job to finish.
429artifact_download_busyTwo downloads are already running.Wait the Retry-After seconds and ask again.
502invalid_model_artifact, model_artifact_digest_mismatch, storage_unavailableThe stored model does not check out, or storage did not answer.Ask again later; tell us if it persists.

Examples

sh
curl -s -o model.safetensors -D headers.txt https://weights.fyi/run/v1/jobs/JOB_ID/model.safetensors \
  -H "Authorization: Bearer $WEIGHTS_API_KEY"
shasum -a 256 model.safetensors

The headers of the answer from a test copy of the service, for a 2 MiB stand-in model:

text
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Content-Disposition: attachment; filename="model.safetensors"
X-Content-SHA256: 4ae141910106a9bf3c3e6da5524dd78ff8e844a7b1d711ab30574744996cc3d6

History

  • 2026-10-10 implementation review: added, with model.artifact in a training job's results.

See also