> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# POST /v1/jobs/estimate

```text
POST https://weights.fyi/run/v1/jobs/estimate
Authorization: Bearer <token>                    scope: submit
{"kind": "finetune", "recipe": "<recipe>", "train_rows": <n>, ...}
```

**Available since:** 2026-10-22: included in this build; see [What is live](/run/docs/what-is-live.md) for deployment status.

**Answer time:** synchronous: the estimate is worked out from the request alone, without reading your account or your data.

Works out, before you send it, what a batch of model calls or a training job would take: how long each part lasts, how many bytes travel in and out, whether the work fits in the memory one run of the model has, and a planning cost in US dollars and euros. An estimate is arithmetic on the numbers you give and the defaults it fills in. It makes no job, holds no credit, starts nothing and charges nothing, and the same request always answers the same `estimate_id`.

Every field is optional, so read the answer's `workload` back: it states what was assumed, and a request without any count is estimated as 100 items. `throughput_source` says what the speed rests on: `measured`, `calibrated` (taken from a similar model that was measured) or `unmeasured` (defaults for a model the estimator does not know). The `cost` follows from the estimated working time, not from the price per unit a job is admitted at; for what a job will be charged, ask [GET /v1/quote](/run/docs/reference/quote.md).

## Request

A JSON object of at most 64 KiB, or the service's small-body limit when that is larger.

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | `Bearer` and a token with `submit`. |
| `workload_kind` or `kind` | body | no | `inference_batch_flex` (or `batch`, `flex`) for a batch of model calls; `finetune_sft`, `finetune_dpo` or `finetune_discriminative` for training. `finetune` picks the training kind from `recipe`. Left out, it is read from `recipe`, `objective`, `format` or the presence of `items`. |
| `recipe` | body | no | A training recipe, such as `laya-page-role/v2`, `laya-specialist-heads/v1`, `laya-student-lora-sft/v1` or `laya-student-lora-dpo/v1`. |
| `objective`, `format` | body | no | `sft`, `dpo` or `specialist_heads`, and the dataset's record format. Each must agree with the kind. |
| `model` or `base_model` | body | no | The model to run or train. Left out: `qwen3.8-27b` for a batch, `laya-student-base` for `sft` and `dpo`, else `laya-page-role-base`. |
| `items`, `items_count` | body | no | A batch's items, or only how many there are. |
| `train_rows`, `validation_rows` | body | no | A training job's rows. |
| `byte_size`, `logical_byte_size`, `compression` | body | no | The data's size as sent and uncompressed, and `none`, `zstd`, `gzip` or `lz4`. Compressed data is not counted as compressed again. |
| `source_ref` | body | no | A dataset pointer; its row and byte counts are read. |
| `options` | body | no | Training options the estimate reads: `epochs`, `checkpoint_seconds`, `max_seq_length`, `lora_rank`, `num_heads`. |
| `max_tokens`, `avg_prompt_tokens`, `avg_completion_tokens`, `response_format` | body | no | A batch: the answer bound, the average tokens per item, and structured output. |
| `strict_fit` | body | no | `true` refuses work that does not fit with `422` instead of answering `fits: false`. |
| `eur_per_usd` | body | no | Your own exchange rate for the euro amounts. |

## Return value

**200 OK** with the estimate. It can hold more fields than these; rely on the ones listed.

| Field | Meaning |
|---|---|
| `schema`, `estimator_version` | `weights.job-estimate/v1` and the estimator's version. |
| `estimate_id`, `spec_sha256`, `basis_sha256` | `est_` and 24 hexadecimal characters, a digest of the work as it was read, and a digest of the whole estimate. |
| `workload_kind`, `model` | The kind that was resolved, and the model under its canonical name. |
| `throughput_source` | `measured`, `calibrated` or `unmeasured`. |
| `hardware_fit` | `estimated_peak_hbm_gb`, the memory the work is expected to need at its peak in GB, and `fits`. |
| `bandwidth_proposal` | The data moved: `item_count`, `logical_ingress_bytes`, `wire_ingress_bytes`, `wire_egress_bytes`, `total_transfer_seconds`, `compression`, `already_compressed`, and `recommended_chunk_items` and `recommended_chunk_count` for sending the work in chunks. |
| `duration` | Seconds by part: `transfer_seconds`, `warmup_seconds`, `compute_seconds`, `validation_seconds`, `checkpoint_seconds`, `calibration_seconds`, and `total_seconds`. |
| `cost` | `usd_micros` and `eur_micros`, the same as `usd` and `eur`, the parts `compute_usd_micros`, `transfer_usd_micros` and `storage_usd_micros`, and `fx`: the exchange rate used, its `source`, `as_of` and `is_fallback` (`true` when you sent no rate). |
| `workload` | What was assumed: rows, epochs, tokens and speeds. |

## Errors

| Status | Code | When it happens | What to do |
|---|---|---|---|
| `400` | `invalid_estimate_spec` | The body is not one JSON object, repeats a key, names no kind that can be resolved, or its `objective`, `format` and kind disagree; `message` says which. | Fix the body. |
| `401` | `unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | No token, or one that does not work (any more). | Use a valid token. |
| `403` | `scope_required`, `account_suspended` | The token lacks `submit`, or the account is suspended. | Use a token with `submit`. |
| `413` | `body_too_large` | The body is over the limit; `limit_bytes` names it. | Send counts and sizes, not the data. |
| `422` | `hardware_fit_exceeded` | `strict_fit` is `true` and the work does not fit. | Make the work smaller, or read `hardware_fit` without `strict_fit`. |
| `429` | `rate_limited` | The token's request rate. | Wait `Retry-After` seconds. |

## Examples

A training job of 40 training and 10 validation rows over 4 epochs; the answer is abridged to the fields above:

```sh
curl -s https://weights.fyi/run/v1/jobs/estimate -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind": "finetune", "recipe": "laya-page-role/v2", "model": "laya-page-role-base", "train_rows": 40, "validation_rows": 10, "options": {"epochs": 4}}'
```

```json
{
  "schema": "weights.job-estimate/v1",
  "estimator_version": "2026-10-22.v1",
  "estimate_id": "est_63575a51e2768b173ebba7b9",
  "workload_kind": "finetune_discriminative",
  "model": "laya-page-role-base",
  "throughput_source": "measured",
  "hardware_fit": {"estimated_peak_hbm_gb": 21.282, "fits": true},
  "duration": {"transfer_seconds": 0.0, "warmup_seconds": 25.0, "compute_seconds": 2.222, "validation_seconds": 0.278,
               "checkpoint_seconds": 67.2, "calibration_seconds": 0.0, "total_seconds": 94.7},
  "cost": {"usd_micros": 63138, "eur_micros": 54722, "usd": 0.063138, "eur": 0.054722,
           "fx": {"eur_per_usd": 0.866701, "usd_per_eur": 1.1538, "source": "ecb_reference_fallback",
                  "as_of": "2026-10-22T00:00:00Z", "is_fallback": true}},
  "workload": {"recipe": "laya-page-role/v2", "epochs": 4, "train_rows": 40, "validation_rows": 10, "num_heads": 1,
               "effective_pages_per_sec": 72.0, "calibrate_temperature_and_thresholds": false}
}
```

## History

- 2026-10-22: built.
- 2026-11-16: this page added.

## See also

- [GET /v1/quote](/run/docs/reference/quote.md) for the price a job is admitted at.
- [POST /v1/jobs](/run/docs/reference/jobs-create.md) and [the training job](/run/docs/reference/jobs-create-finetune.md) to send the work.
- [Prices and billing](/run/docs/prices.md), the topic.
