Skip to content
Hayonix

API reference · Fine-tuning

Download the adapter or the merged weights of a checkpoint as a tar archive

GET/v1/fine-tunes/{fine_tune_id}/download
API keyfine_tune_job:readProject
TypeScript
client.fineTuning.download()
Python
client.fine_tuning.download()
CLI
hayonix fine-tunes download

Streams one artefact of the final checkpoint, or of checkpoint_id. Answers 400 artifact_unavailable when the checkpoint lacks it (a full fine-tune has no adapter). Where a request cannot carry credentials, create a download link instead.

Project API key (Authorization: Bearer sk_…), or a console session. Requires the fine_tune_job:read permission (a key's scope, or a role that includes it).

Examples

The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.

curl -sS "$API_BASE_URL/fine-tunes/ftj_01jc5zq4m8k3v6x9t2w7r0b1e4/download" \
  -H "Authorization: Bearer $API_KEY" \
  -o output.bin

Request

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Path parameters

  • fine_tune_idstringrequired

    ID of the fine-tuning job

    ID with prefix ftj_

Query parameters

  • artifactstring

    `adapter` (LoRA, default for LoRA jobs), `merged` (full weights, default for full fine-tunes), or a serving format: `adapter_gguf`, `merged_gguf`

    One ofadaptermergedweightsadapter_ggufmerged_gguf

  • checkpoint_idstring

    Default: the final checkpoint

    ID with prefix ftc_

Response

200 the file content (application/x-tar) — A tar archive: `<artifact>-step-<n>/<files>`

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
404not_found_errorNo such resource in this project (an ID from another project is answered the same way).
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.