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

# Fine-tuning jobs

> Get a quote, create a job with its length and hyperparameters, follow its statuses and events, cancel it, and what it is charged.

> [!NOTE]
>
> Fine-tuning is in private preview. Only invited accounts can use it; any other account gets `403
>   	fine_tuning_unavailable`. The prices and rules on this page can change before it opens to every
> account.

## Get a quote

`POST /v1/fine_tuning/quote` takes a job's body and answers what that job would train and cost, before anything is held.
It is free, and Platform's Training page asks for one whenever a choice changes.

```sh theme={"theme":"css-variables"}
curl https://api.abstract.inc/v1/fine_tuning/quote \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Content-Type: application/json" \
  -d '{"model": "allenai/molmoact2", "dataset": {"huggingface": "allenai/19012026-block-04"}}'
```

```json theme={"theme":"css-variables"}
{
	"object": "fine_tuning.quote",
	"model": "allenai/molmoact2",
	"dataset": {
		"huggingface": "allenai/19012026-block-04",
		"revision": null,
		"commit": "9c1d0e7f3a2b4c5d6e7f8091a2b3c4d5e6f70812"
	},
	"robot": "bimanual_yam",
	"served": true,
	"clean": true,
	"mapping": {
		"state": ["observation.state"],
		"action": ["action"],
		"cameras": { "observation.images.top": "observation.images.top", "...": "..." }
	},
	"summary": {
		"version": "v3.0",
		"fps": 30,
		"episodes": 40,
		"frames": 62000,
		"hours": 0.57,
		"...": "..."
	},
	"warnings": [],
	"length": "auto",
	"steps": 3000,
	"passes": 1.55,
	"max_cost_usd": 38.61,
	"usd_per_1000_steps": 12.87,
	"eta_seconds": 5855,
	"rate_version": "2026-10-26-per-step"
}
```

**robot** `string`

The robot the dataset was recorded on. See [Robots](https://docs.abstract.inc/fine-tuning/datasets#robots).

**served** `boolean`

Whether Abstract serves the fine-tune once it is ready. When `false`, the fine-tune is download
only, for now.

**mapping** `object`

The columns and cameras the job trains from: yours, or the proposal. See
[Mapping](https://docs.abstract.inc/fine-tuning/datasets#mapping).

**steps** `integer`

The steps the job trains: the most it can run.

**max\_cost\_usd** `number`

The most the job can cost: `steps` at `usd_per_1000_steps`. The job holds it.

**usd\_per\_1000\_steps** `number`

The price per 1,000 steps, locked for the job.

**eta\_seconds** `integer`

The time from queued to ready: preparation, start-up, training, export and evaluation.

**passes** `number`

How many times training goes over the dataset's frames.

A dataset the model cannot train answers `422 dataset_not_trainable`, with every finding in `errors`.
An upload is quoted from the `meta/` files sent with it.

## Create a job

```sh theme={"theme":"css-variables"}
abstract finetune create --dataset ds_... --suffix pick-cups
```

The command asks for a quote, shows it, then asks before it starts; `--yes` skips the question.
`--dataset` takes a `ds_` id or `hf:owner/name[@revision]`. See [Datasets](https://docs.abstract.inc/fine-tuning/datasets).
Without `--suffix`, the model is named after the dataset.

Over HTTP:

```sh theme={"theme":"css-variables"}
curl https://api.abstract.inc/v1/fine_tuning/jobs \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "allenai/molmoact2",
    "dataset": "ds_...",
    "suffix": "pick-cups",
    "length": "auto",
    "quoted_usd": "38.61"
  }'
```

**model** `string` *required*

The base model: `allenai/molmoact2` or `physical-intelligence/pi0.5` (download only, including on bimanual YAM). New `nvidia/dreamzero` quotes and jobs answer `503 fine_tuning_unavailable`: its fine-tunes cannot be served or downloaded yet. Unknown bases answer `400 model_not_tunable`.

**dataset** `string | object` *required*

A `ready` upload's `ds_` id, or `{"huggingface": "owner/name", "revision": "main"}` for a public Hugging Face dataset. `revision` is optional: a branch, a tag or a commit.

**suffix** `string` *required*

1 to 40 lowercase letters, digits or dashes. The model is named `ft/molmoact2-<suffix>-<last 8 characters of the job id>`, or `ft/pi05-...`, `ft/dreamzero-...`.

**length** `string`

`auto` (the default), `steps` or `budget`. See [Length](#length).

**hyperparameters** `object`

Any of the knobs below. Each one left out takes its default. `steps` is for a length of `steps` only.

**budget\_usd** `string | number`

For a length of `budget`: the most to spend, in dollars to the cent.

**clean** `boolean`

`true` (the default) runs [auto-clean](https://docs.abstract.inc/fine-tuning/datasets#auto-clean); `false` trains on every frame as recorded.

**mapping** `object`

Your own [mapping](https://docs.abstract.inc/fine-tuning/datasets#mapping). Without it, the proposal.

**quoted\_usd** `string | number`

The quote you agreed to. The API quotes the job again; when that comes above `quoted_usd` it answers `409 quote_changed` with the new `quote`, and nothing is held.

Send an `Idempotency-Key`: a create sent again with the same key answers the same job, so a lost answer never starts, or holds credit for, a second job.
The CLI sends one, and sends the quote it showed as `quoted_usd`.

### Length

| Length | Steps | Send |
| - | - | - |
| `auto` | From the data: enough passes over its frames for the model, within its steps range. After [auto-clean](https://docs.abstract.inc/fine-tuning/datasets#auto-clean), the job may train fewer, never more. | Nothing more |
| `steps` | Exactly `hyperparameters.steps` | `"hyperparameters": {"steps": 2000}` |
| `budget` | The most steps `budget_usd` buys at the quote's own rate | `"budget_usd": "25.00"` |

A budget too small for the model's fewest steps answers `400 invalid_request` with the least it takes.
The CLI takes `--steps <n>` or `--max-usd <dollars>`; neither is Auto.

### Hyperparameters

Each base has its own knobs. None changes the price per step but `steps`, through the length.

`allenai/molmoact2`:

| Knob | Default | Range | What it sets |
| - | - | - | - |
| `steps` | 3000 | 100 to 4500 | Training steps, for a length of `steps`. |
| `lora_rank` | 64 | 8 to 128 | The rank of the LoRA adapter on the vision-language model. |
| `eval_fraction` | 0.1 | 0 to 0.3 | The share of episodes held out of training and used to score the fine-tune. 0 skips the evaluation. |
| `seed` | 1000 | 0 to 2,147,483,647 | The random seed. |

`physical-intelligence/pi0.5`, a full fine-tune:

| Knob | Default | Range | What it sets |
| - | - | - | - |
| `steps` | 3000 | 500 to 30000 | Training steps, for a length of `steps`. |
| `learning_rate` | 0.000025 | 0.000002 to 0.0001 | The learning rate. |
| `rtc_max_delay` | 0 | 0 to 15 | Real-time chunking: trains the model to continue a chunk already in flight, for robots that keep executing while the next chunk is computed. 0 is off; Platform's switch and `--rtc` send 10. |
| `eval_fraction` | 0.1 | 0 to 0.3 | The share of episodes held out of training and used to score the fine-tune. 0 skips the evaluation. |
| `seed` | 1000 | 0 to 2,147,483,647 | The random seed. |

`nvidia/dreamzero` (historical jobs only; new training is unavailable):

| Knob | Default | Range | What it sets |
| - | - | - | - |
| `steps` | 1000 | 100 to 3000 | Training steps, for a length of `steps`. |
| `lora_rank` | 32 | 8 to 64 | The rank of the LoRA adapter on the video diffusion transformer. |
| `learning_rate` | 0.00001 | 0.000002 to 0.00002 | The learning rate. |
| `eval_fraction` | 0.1 | 0 to 0.3 | The share of episodes held out of training and used to score the fine-tune. 0 skips the evaluation. |
| `seed` | 42 | 0 to 2,147,483,647 | The random seed. |

Every knob but `eval_fraction` and `learning_rate` is a whole number.
A value out of range, or a knob the base does not have (`learning_rate` on MolmoAct2, `rtc_max_delay` anywhere but π0.5), answers `400 invalid_hyperparameters`.
The batch is each model's own, the one its price was measured at.
The CLI sets them with `--lora-rank`, `--learning-rate` and `--rtc`.

### What the API checks

In this order, before anything runs:

1. The base model can be fine-tuned, and the length and knobs are in range: `400 model_not_tunable`, `invalid_request` or `invalid_hyperparameters` otherwise.
2. The dataset is a `ready` upload or an `owner/name` Hugging Face repository, and the model trains it: `400 dataset_not_ready` or `422 dataset_not_trainable` otherwise.
3. The quote is not above `quoted_usd`: `409 quote_changed` otherwise.
4. The account has no other live job: `409 job_limit` otherwise.
5. The account holds fewer than 200 fine-tuned models: `413 storage_full` otherwise. Nothing is held.
6. The quote fits the account's credit and spend limit: `402 insufficient_credit`, `429 spend_limit_exceeded` or `429 spend_blocked` otherwise. Nothing is held.

The job is then written as `queued`, holding its quote, and handed to the training service.
If the service refuses it, the job fails with `dispatch_failed`, the hold is released in full, and the API answers `400 invalid_request` (the spec) or `503 fine_tuning_unavailable`.
If the service's answer is lost, the job stays `queued` with its hold while Abstract checks; one the service never took fails `dispatch_failed` within about 15 minutes, its hold released.

## The job

```json theme={"theme":"css-variables"}
{
	"id": "ftjob_0000mvooezrg0001",
	"object": "fine_tuning.job",
	"model": "allenai/molmoact2",
	"dataset": { "id": "ds_0000mvoocgne0000" },
	"suffix": "pick-cups",
	"robot": "bimanual_yam",
	"served": true,
	"clean": true,
	"mapping": { "state": ["observation.state"], "action": ["action"], "cameras": { "...": "..." } },
	"hyperparameters": { "steps": 3000, "lora_rank": 64, "eval_fraction": 0.1, "seed": 1000 },
	"status": "training",
	"progress": { "step": 1200, "steps": 3000, "loss": 0.0812, "eval_loss": 0.0975 },
	"fine_tuned_model": null,
	"estimate": {
		"steps": 3000,
		"length": "auto",
		"usd_per_1000_steps": 12.87,
		"max_cost_usd": 38.61,
		"eta_seconds": 5855,
		"hours": 1.6
	},
	"billing": { "reserved_usd": 38.61, "steps": 1200, "cost_usd": 15.44 },
	"error": null,
	"evaluation": null,
	"created_at": 1792983942,
	"finished_at": null
}
```

The numbers above are an example. Read the rate from your own job's `estimate`.

**dataset** `object`

`{"id": "ds_..."}`, or `{"huggingface", "revision", "commit"}`. `commit` is the Hugging Face commit the job pinned, once it has.

**robot** `string`

The robot the quote found.

**served** `boolean`

Whether Abstract serves the fine-tune once ready; `false` is download only.

**hyperparameters** `object`

Every knob of the base, defaults filled in; `steps` is the quote's.

**status** `string`

One of the statuses below.

**progress** `object`

`step` of `steps`, the training `loss`, and `eval_loss` on the held-out episodes. `steps` drops below the quote's when Auto shortens the run after auto-clean. `loss` and `eval_loss` are `null` until training reports them.

**fine\_tuned\_model** `string | null`

The model id, `ft/molmoact2-...`, once the job has succeeded.

**estimate** `object`

The quote the job holds: `steps`, `length`, `usd_per_1000_steps`, `max_cost_usd` (the hold) and `eta_seconds` (`hours`, the same in hours).

**billing** `object`

`reserved_usd`: the hold. `steps` and `cost_usd`: the steps charged so far, and their cost.

**error** `object | null`

`{"code", "message"}` once the job has failed.

**evaluation** `object | null`

The scores once the job has succeeded. See [Evaluation](#evaluation).

**created\_at** `integer`

Unix seconds. `finished_at` is set once the job ends.

## Statuses

| Status | What happens |
| - | - |
| `queued` | Waiting for the training service. |
| `validating` | The dataset is checked for the model and its robot, with its mapping. A Hugging Face revision is pinned to its commit. |
| `preparing` | The dataset is fetched, converted from v2.1 if need be, mapped, [auto-cleaned](https://docs.abstract.inc/fine-tuning/datasets#auto-clean), split by `eval_fraction`, and its normalization written. |
| `training` | `progress` moves. After a restart, training resumes from its last checkpoint. |
| `exporting` | The fine-tune's files are written: a merged checkpoint (MolmoAct2), the trained weights (π0.5) or the adapter (DreamZero). |
| `evaluating` | The fine-tune, its base and holding still are scored on the held-out episodes. |
| `succeeded` | `fine_tuned_model` is set. |
| `failed` | `error` says why. |
| `cancelled` | Stopped by a cancel. |

A job only moves forward, or out to `failed` or `cancelled`.
A failed job's `error.code` is one of the [job error codes](#a-failed-job).

## Follow a job

```sh theme={"theme":"css-variables"}
abstract finetune get ftjob_...      # its status, step, loss and billing
abstract finetune events ftjob_...   # its last 200 events
abstract finetune list               # newest first
```

Platform's [Training page](https://docs.abstract.inc/fine-tuning/overview#on-platform) lists your runs, and each run's page follows it every few seconds with its statuses, steps, loss and cost.

Run `get` again to follow the job; `--json` prints the API's answer as it came.

`GET /v1/fine_tuning/jobs?limit=20&after=ftjob_...` lists jobs newest first, at most 100 a page.
`has_more` says whether another page follows; pass the last id as `after` to read it.
A job of another account answers `404 job_not_found`.

### Events

```sh theme={"theme":"css-variables"}
abstract finetune events ftjob_...
```

`GET /v1/fine_tuning/jobs/{id}/events` returns the last 200 events the training service reported, each `{"at", "status", "message"}`.
The dataset check's warnings appear here.

### Evaluation

A succeeded job's `evaluation` scores three things on samples from the held-out episodes: the fine-tune, its base, and holding the current state still.
Each is compared with what the robot did next, over a chunk: MolmoAct2's 30 actions, DreamZero's 24.
DreamZero is scored on an episode's opening chunk, from one frame per camera; the model leans on its video history, so this measures it less well than MolmoAct2.
A job with no held-out episodes (`eval_fraction` 0) has `{"skipped": "<why>"}`.

| Field | Meaning |
| - | - |
| `fine_tune`, `base`, `hold` | Each one's `arm_mae`, the mean absolute error over the twelve arm joints in radians, and `gripper_mae`, over the grippers on their 0 to 1 scale. |
| `fine_tune_beats_base`, `fine_tune_beats_hold` | The share of samples on which the fine-tune's arm error is lower. |
| `samples`, `episodes` | What was scored. |

A fine-tune that does not beat holding still has learned nothing useful about this data.
The scores are open loop, on recorded data: they do not measure task success on a robot.
With `eval_fraction` 0, or when it cannot run, `evaluation` is `{"skipped": "<why>"}`.

## Cancel a job

```sh theme={"theme":"css-variables"}
abstract finetune cancel ftjob_...
```

`POST /v1/fine_tuning/jobs/{id}/cancel` stops the running stage and answers the job; a run's page on Platform cancels it too, after asking.
A cancelled job is charged for the steps it finished.
A job that has already ended is answered as it is.

## Charges

A job is priced per 1,000 steps: the compute it takes at measured speed, start-up, checkpoints and evaluation included, locked in its quote.

1. Before the job starts, the API holds its quote, `estimate.max_cost_usd`: the most it can cost, wherever it runs and however long it takes.
2. When the job ends, it is charged its steps at `estimate.usd_per_1000_steps`, to the cent, never more than the hold. The rest of the hold is released.

| Ends as | Charged |
| - | - |
| `succeeded` | The steps it trained: the quote's, or fewer when Auto shortened the run after auto-clean |
| `cancelled` | The steps it finished before it stopped |
| `failed` | Nothing |

For example, a job quoted at $12.87 per 1,000 steps and cancelled at step 1,200 is charged $15.44.
The hold needs prepaid credit, and counts against the monthly spend limit.

## Error codes

Fine-tuning errors have the same shape as every other error: see [Errors and limits](https://docs.abstract.inc/errors.md).
These codes come from `/v1/datasets` and `/v1/fine_tuning/...`, and `model_loading` from the robot routes when `model` is a fine-tune.

| HTTP | Code | Meaning | What to do |
| - | - | - | - |
| 403 | `fine_tuning_unavailable` | Fine-tuning is in private preview, and the account is not invited. | Ask Abstract for access. |
| 503 | `fine_tuning_unavailable` | The base cannot deliver a served model or downloadable weights yet (new DreamZero jobs), the recipe is not activated, the training service refused the job, storage failed for a moment, or a fine-tune has not answered for ten minutes. An unavailable base is refused before a hold; a dispatched job that was not taken is `failed` with `dispatch_failed`, and its hold is released. | Choose an available base for unavailable training; otherwise retry later. |
| 400 | `model_not_tunable` | The base model cannot be fine-tuned. | Send `allenai/molmoact2` or `physical-intelligence/pi0.5`. |
| 422 | `dataset_not_trainable` | The model cannot train this dataset: its robot, columns, cameras or rate do not fit. `errors` lists every finding. | Fix what the findings name, send a [mapping](https://docs.abstract.inc/fine-tuning/datasets#mapping), or choose a model that trains it. |
| 409 | `quote_changed` | The job now quotes above `quoted_usd`. The answer carries the new `quote`; nothing was held. | Create the job again with the new quote. |
| 409 | `dataset_meta_missing` | The upload has no `meta/` files on Abstract, which a quote reads. | Upload it again with the current CLI. |
| 400 | `invalid_meta`, `invalid_mapping` | `meta_files` or `mapping` is malformed or too large. | Fix what the message names. |
| 409 | `model_not_served` | The fine-tune is download only: Abstract does not serve it yet. | Download its weights. |
| 400 | `invalid_hyperparameters` | A hyperparameter is unknown, not a number, or out of its range. | Fix the knob the message names. See [Hyperparameters](#hyperparameters). |
| 400 | `dataset_not_ready` | The upload is not `ready`, or the Hugging Face dataset is not `owner/name`. | Finish the upload, or fix the name. |
| 413 | `dataset_too_large` | The dataset is over 20 GiB. | Upload a smaller dataset. |
| 413 | `storage_full` | The account's datasets would pass 50 GiB, the account holds 200 datasets, or the account holds 200 fine-tuned models. | Delete a dataset or model first. |
| 400 | `upload_incomplete` | A part is missing, a part's `etag` is not the one its upload answered, or the stored size differs from `bytes`. | Send the missing parts, then complete again with each part's own `etag`. |
| 409 | `dataset_in_use` | A live job uses the dataset. | Wait for the job to end, or cancel it. |
| 409 | `job_limit` | The account already has a live job. | Wait for it to end, or cancel it. |
| 404 | `job_not_found` | No job with this id belongs to your account. | Use an id your account created. |
| 403 | `download_unavailable` | This base model's fine-tunes cannot be downloaded. | Call the model through the API instead. |
| 503 | `model_loading` | The fine-tune is starting after five idle minutes. After ten minutes of this, the call answers `fine_tuning_unavailable` instead. | Wait for the `Retry-After` seconds, then send the same observation again, under the same `observation_id`. |
| 400 | `invalid_request`, `invalid_body` | A field is missing or malformed, the body is not a JSON object, or the training service refused the job's spec (its message says why, and nothing is held). | Fix what the message names. |
| 404 | `dataset_not_found` | No dataset with this id belongs to your account, or (the [dataset check](https://docs.abstract.inc/fine-tuning/datasets#check-it-before-a-job)) no public Hugging Face dataset has this name and revision. | Use an id your account created, or fix the name. |
| 400 | `invalid_dataset` | `dataset` is neither a `ds_` id nor `{huggingface, revision}` with a repository named `owner/name`. | Fix what the message names. |
| 409 | `upload_expired` | The upload was left unfinished for 6 days; the dataset is now `failed`. | Create the dataset again and upload it from the start. |
| 400, 409 | `invalid_part` | The part number is out of range, its length is not `part_bytes` (the last part excepted), or the dataset is no longer `uploading`. | Send the part the message names, at its length. |
| 404 | `file_not_found` | The fine-tune has no file of this name. | List its files first. |
| 416 | `invalid_range` | The `Range` header asks for bytes past the file's end. `content-range` gives the file's size, as `bytes */<size>`. | Ask for a range inside `bytes`. |
| 412 | `precondition_failed` | An `If-Match` names an `etag` the file no longer has. | Download the file again from its start. |
| 405 | `method_not_allowed` | The route does not take this method. | Use the method the reference names. |

A fine-tuning route answers `404 not_found` while fine-tuning is switched off.
Credit and spend-limit refusals use the codes under [Every route](https://docs.abstract.inc/errors.md#every-route).

### A failed job

A job that fails carries one of these in its `error.code`:

| Code | Meaning | What to do |
| - | - | - |
| `invalid_dataset` | The dataset check refused the dataset. The message lists every finding. | Fix the dataset as [Datasets](https://docs.abstract.inc/fine-tuning/datasets#what-the-check-enforces) says, then create a new job. |
| `dispatch_failed` | The training service did not take the job: it refused it, or, after its answer was lost, it said for ten minutes it did not have it. Nothing was charged. | Create the job again. |
| `stage_failed` | A stage failed on Abstract's side; the message names it. Nothing was charged. | Create the job again; tell Abstract if it fails twice. |
| `export_incomplete` | A file of the fine-tune did not reach storage. Nothing was charged. | Create the job again. |
| `job_lost` | The job was still running two hours past the longest any job runs (a day), or the training service lost it. Nothing is charged, and the service is asked to stop it. | Create the job again. |


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