> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/llms.txt to discover and navigate pages. Use https://docs.fastino.ai/llms-full.txt when you need the complete documentation corpus. Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/GLiDE. Start managed training (config job) with POST /v1/training/jobs using base_model. For interactive training, native JSON clients use the public operations under /v1/training/jobs and /v1/training/usage. Existing Tinker clients use tinker==0.32.0 with TINKER_BASE_URL=https://api.fastino.ai/v1/training/compat/tinker and TINKER_CREDENTIAL_CMD. Compatibility child routes are private and absent from OpenAPI. Auto Train is private access and has no public route; direct interested users to sales@fastino.ai. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# Checkpoints and recovery

> Save interactive-job state and application progress, then recover without replaying completed work.

A state checkpoint protects server-side training state. A complete recovery
record also protects the user-owned state that tells your controller what to do
next.

The examples use the `call` and `wait` helpers from the
[Quickstart script](https://docs.fastino.ai/training/decoder-quickstart.md).

## What to save

| Record | Contains | Stored by |
| - | - | - |
| State checkpoint | LoRA weights and optimizer state | Fastino |
| Loop record | Source job ID, checkpoint path, step, dataset cursor, configuration, and resume lineage | Your application |

## 1. Save state and loop progress

Save the state with `save-weights`, wait for it, then persist its path with the
client-owned fields needed to continue:

```python theme={null}
import json
from pathlib import Path


state = call(
    "POST",
    f"/v1/training/jobs/{job_id}/save-weights",
    {"name": f"step-{step:06d}"},
)
state_path = wait(job_id, state["future_id"])["path"]
record = {
    "source_job_id": job_id,
    "state_path": state_path,
    "model": model_name,
    "dataset_revision": dataset_revision,
    "optimizer": adam_params,
    "step": step,
    "dataset_cursor": dataset_cursor,
    "reward_version": reward_version,
}

with Path(log_path).open("a", encoding="utf-8") as checkpoint_log:
    checkpoint_log.write(json.dumps(record, sort_keys=True) + "\n")
```

The path in the initial save response is provisional. The checkpoint becomes
durable only when the save future completes; if the future fails or is
cancelled, do not persist or use that path.

Use unique checkpoint names so each loop record identifies an unambiguous
recovery boundary. Names use 1–128 characters from `A-Z`, `a-z`, `0-9`, `.`,
`_`, and `-`. Names beginning with `__park-` or `__snap-` are reserved.

## 2. Read the newest complete record

A process can stop while writing the final line. Scan backward and skip a
malformed tail:

```python theme={null}
def get_last_checkpoint(log_path: str) -> dict[str, object] | None:
    path = Path(log_path)
    if not path.exists():
        return None

    for line in reversed(path.read_text(encoding="utf-8").splitlines()):
        try:
            record = json.loads(line)
        except json.JSONDecodeError:
            continue
        if isinstance(record, dict) and isinstance(record.get("state_path"), str):
            return record
    return None
```

## 3. Validate before loading

Compare the record with the source checkpoint and requested continuation:

* Source job ID in the checkpoint path
* Base model and LoRA configuration
* Dataset revision and cursor
* Reward implementation revision
* Optimizer settings
* Tokenizer and chat-template assumptions

Stop for an explicit decision if these fields conflict. Don't silently combine
a checkpoint with a different experiment.

Then choose how to continue:

| Situation | Call |
| - | - |
| The source job is still active and you want to roll back | `POST /v1/training/jobs/{job_id}/load-weights` with `{"path": "<name>", "optimizer": true}` |
| The source job was stopped or released | `POST /v1/training/jobs/create-model` with `from_checkpoint` and `load_optimizer` |

To continue in a new job:

```python theme={null}
resume = get_last_checkpoint(log_path)
if resume is None:
    raise RuntimeError("no durable checkpoint record found")

resumed = call(
    "POST",
    "/v1/training/jobs/create-model",
    {"from_checkpoint": resume["state_path"], "load_optimizer": True},
)
wait(resumed["job_id"], resumed["future_id"])
wait(resumed["job_id"], resumed["load_future_id"])
resumed_job_id = resumed["job_id"]
```

The new job takes the checkpoint's base model and LoRA settings, so don't send
`lora_config`. Its ID differs from the source job ID. Record `source_job_id`,
`state_path`, and `resumed_job_id` as application-owned lineage.

## 4. Make the boundary recoverable

Use this order:

1. Wait for the forward-backward and optimizer-step futures to complete.
2. Save the state checkpoint and wait for the save future.
3. Persist the loop record containing its path.
4. Mark the application step complete.
5. Begin the next step.

If the process exits after saving the checkpoint but before persisting the loop
record, keep the previous complete record as the trusted recovery point. Don't
mark a step complete before its record is durable.

Future results remain recoverable for one hour. During that window, poll a
known save `future_id` before deciding what happened. If it returns `410`, do
not blindly repeat the save: reconcile the job's checkpoints and your durable
loop record. The long-term commit boundary is a completed checkpoint plus its
durable application record, not the future itself.

## 5. Keep checkpoint kinds separate

```python theme={null}
name = f"step-{step:06d}"
state = call(
    "POST",
    f"/v1/training/jobs/{job_id}/save-weights",
    {"name": name},
)
sampler = call(
    "POST",
    f"/v1/training/jobs/{job_id}/save-weights-for-sampler",
    {"name": name, "ttl_seconds": 24 * 60 * 60},
)
```

| Saved with | Checkpoint ID suffix | Full path | Use it for |
| - | - | - | - |
| `save-weights` | `weights/<name>` | `tinker://<job_id>/weights/<name>` | Training recovery: load it or start a new job from it |
| `save-weights-for-sampler` | `sampler_weights/<name>` | `tinker://<job_id>/sampler_weights/<name>` | Rollouts, evaluation, deployment, and adapter download |

Don't use a sampler checkpoint as a recovery point; it has no optimizer state
and a new job can't start from it. Pass the full `tinker://.../weights/<name>`
path, not the checkpoint ID suffix, as `from_checkpoint`.

`ttl_seconds` defaults to `null`, so an omitted TTL keeps the checkpoint until
you delete it. Live checkpoints count toward checkpoint storage. To enable
automatic cleanup, pass a value from `3600` to `315360000` seconds (1 hour to
10 years).

Manage checkpoints with these routes:

| Task | Route |
| - | - |
| List a job's checkpoints | [`GET /v1/training/jobs/{job_id}/checkpoints`](https://docs.fastino.ai/api-reference/training-jobs/checkpoints) |
| Get one checkpoint | [`GET /v1/training/jobs/{job_id}/checkpoints/{kind}/{name}`](https://docs.fastino.ai/api-reference/training-jobs/interactive/get-checkpoint) |
| Download as a `.tar` archive | [`GET /v1/training/jobs/{job_id}/checkpoints/{checkpoint_id}/download`](https://docs.fastino.ai/api-reference/training-jobs/download-checkpoint) |
| Change its TTL | [`PUT /v1/training/jobs/{job_id}/checkpoints/{kind}/{name}/ttl`](https://docs.fastino.ai/api-reference/training-jobs/interactive/set-checkpoint-ttl) |
| Publish or unpublish | [`POST /v1/training/jobs/{job_id}/checkpoints/{kind}/{name}/publish`](https://docs.fastino.ai/api-reference/training-jobs/interactive/publish-checkpoint) |
| Delete | [`DELETE /v1/training/jobs/{job_id}/checkpoints/{kind}/{name}`](https://docs.fastino.ai/api-reference/training-jobs/interactive/delete-checkpoint) |
| Read storage usage | [`GET /v1/training/usage`](https://docs.fastino.ai/api-reference/training-jobs/interactive/storage-usage) |

Checkpoint downloads are enabled by default. A decoder's sampler checkpoint
downloads as a standard Hugging Face PEFT adapter for the public base model;
see [Load a decoder adapter](https://docs.fastino.ai/api-reference/training-jobs/download-checkpoint.md#load-a-decoder-adapter).

After a job is stopped, mutating training operations are rejected, but you can
still list, inspect, download, publish, change the TTL of, and delete its
checkpoints. You can also sample from its sampler checkpoints.

## 6. Verify the continuation

Before scaling the resumed workload:

1. Start the new job from the selected state checkpoint.
2. Persist its ID as `resumed_job_id`, and confirm it through
   `GET /v1/training/jobs/{resumed_job_id}`.
3. Run a small held-out evaluation.
4. Submit one training update.
5. Save a new state checkpoint under a new name.
6. Persist the next loop record.

## Deploy your trained model

Deploy a sampler checkpoint to serve it as a model. Deployment is available for
Nemotron 3.5 Super VL and Nemotron 3.5 Lightning; Qwen3.6-35B-A3B requires rollout
enablement. For current
callable IDs, see [Deploy an interactive-job checkpoint](https://docs.fastino.ai/api-reference/training-jobs/interactive/deploy-checkpoint.md).
If the serving model is not available to your team, deployment returns `400`
with `serving for <model> is not available yet`.

```bash theme={null}
curl -X POST "https://api.fastino.ai/v1/training/jobs/$TRAINING_JOB_ID/checkpoints/sampler_weights/step-000100/deploy" \
  -H "X-API-Key: $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model_name": "support-replies-v1"}'
```

The response has the model's `model_id` and a `status` of `deploying`. Repeat
the same call to check progress; it returns the same model, and `status` becomes
`deployed` once the model is ready. Then call it by ID:

```bash theme={null}
curl -X POST "https://api.fastino.ai/v1/chat/completions" \
  -H "X-API-Key: $FASTINO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID",
    "messages": [{"role": "user", "content": "Summarize this ticket in one sentence."}],
    "reasoning": {"enabled": false}
  }'
```

Replace `MODEL_ID` with the returned `model_id`. The first inference request can
return `425 model_warming`; wait for the `Retry-After` interval and retry.
To request a direct answer without a reasoning preamble, send
`"reasoning": {"enabled": false}` as shown above. See
[Deploy checkpoint](https://docs.fastino.ai/api-reference/training-jobs/interactive/deploy-checkpoint.md) for the
request fields and errors.

## Diagnose recovery errors

| Symptom | Check |
| - | - |
| A future fails | Record the job ID and the future's `error`. Don't advance dependent application state |
| A training call returns `400` after a pause | The job was stopped or released after 30 idle minutes. Mutating training is unavailable; checkpoint management and sampler-checkpoint sampling remain available. Start a new job from the latest state checkpoint to continue training |
| A checkpoint can't be loaded | Verify its job, checkpoint kind, and client-owned recovery record |
| `from_checkpoint` is rejected | Confirm it is a full `tinker://<job_id>/weights/<name>` path from your team; sampler checkpoints can't seed a job |
| Resumed job lookup fails | Confirm that the ID came from the new job's create response and that the same Fastino team is authenticated |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.