Skip to main content

Training jobs

On this page you start a training run on your examples, follow it while it trains, control it, and download the model it produces.

A training job fine-tunes a base model on the examples you select. Text and embedding projects train through the same API: the project's type decides which body POST .../training-jobs accepts, and every other route is shared and returns the same job shape. Training runs in the background; use the model once the job's model_available is true. Only measured training time is billed: a run that never begins training is free, and an attempt that fails is not charged.

Start a text-generation run​

Select chats by tag and choose a base model:

curl -X POST "https://reopenly.com/api/v1/projects/acme/support/training-jobs" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"dataset_tags": ["support-clean"], "model_name": "ReOpenly/Qwen3.5-9B", "max_seq_length": 2048, "num_train_epochs": 3}'

The response is the new job:

{"id": 87, "number": 4, "status": "pending", "task": "text_generation", "model_name": "ReOpenly/Qwen3.5-9B", "planned_steps": 57, "cost_credits": 0.0}

id is the job's API identifier: use it as {job_id} in every route on this page and as training_job_id when you host the model. number is the run number shown in the app, counted from 1 within the project; it is not an API identifier unless you ask for it (see Follow a run).

Before the job is created, ReOpenly checks your balance: if it does not cover the run's padded estimate (see Estimate before you start), create answers 402 insufficient_credits and nothing is created. An account runs one unfinished training job at a time, so a second start is refused with 409 training_slot_occupied while the first is queued, running or pausing. POST .../training-jobs takes no idempotency key: if a start times out, list the jobs before trying again.

dataset_tags must name existing tags exactly. Several tags select the union of their chats, duplicates are ignored, and an empty list selects every chat in the project. Add "dataset_untagged": true to also select the chats that carry no tag; on its own (with no dataset_tags) it selects only those, by the same rule as the chat list's untagged filter, and the job returns it as dataset_untagged. An unknown or blank tag answers training_dataset_selection_invalid; an empty selection training_dataset_empty; a selection with no trainable text training_dataset_unusable. These are 422 on create and 409 on retry, and nothing is created or charged.

num_train_epochs is how many complete passes the run makes over your selected examples, and it accepts fractions (0.5 is half a pass). The server converts it into training steps from the selection size and the batch shape, and freezes the result on the job as planned_steps:

effective_batch_size = per_device_train_batch_size × gradient_accumulation_steps
steps_per_epoch = ceil(train_examples / effective_batch_size)
planned_steps = max(1, ceil(steps_per_epoch × num_train_epochs))

For example, 152 training examples at the default effective batch of 8 take ceil(152 / 8) = 19 steps per epoch, or 57 planned steps for 3 epochs. A final partial batch still counts as one step. max_steps (1 to 100) is the alternative: a fixed number of steps. Send one or the other, never both.

Text settings​

Every setting you omit is filled in from the base model's training profile and frozen with the job, so a job read back later reports exactly what it ran with. GET /api/v1/base-models publishes each setting's min, max, default and whether it accepts fractions (integer) under limits: read them there rather than copying the defaults below, which are today's. A refused value answers with a code and the field it is about.

SettingDefaultWhat it doesChange it when
num_train_epochs3Complete passes over the selected examples; fractions are allowed.The validation loss is still falling at the last check (more passes), or is lowest early and then rises (fewer). A very large selection may need a fraction to fit the time limit.
max_stepsnot sentA fixed number of steps instead of epochs.You want a short trial run of a known length.
learning_rate0.0002How far each step moves the adapter.The validation loss is lowest early and then rises (lower it), or barely moves from the first check (raise it).
max_seq_length2048The longest sequence, in tokens, a training example is trained at.Your chats are longer than that. Longer sequences take more training time: compare the estimates.
lora_rank16The adapter's size, from 4 to 64. A higher rank trains more parameters and makes a larger download.You are comparing runs on your own test set.
lora_alpha32How strongly the adapter is applied, at alpha ÷ rank.You change lora_rank: keep alpha at the rank or twice it.
per_device_train_batch_size2Examples processed together in one step.Rarely. To enlarge the batch, raise gradient_accumulation_steps instead (see Billing and limits).
gradient_accumulation_steps4Batches averaged into one step. The effective batch is this times the batch size, 8 by default.You want each step to average over more examples. An epoch then takes fewer steps.
warmup_steps10, automaticSteps over which the learning rate ramps up to learning_rate. Automatic warmup is shortened when the run has fewer steps.Rarely. A value you send must be below the planned steps.
loss_maskassistant_onlyWhich tokens the run learns from: the assistant replies only, or, with full_sequence, every message.You also want the model to learn to write the user and system text.
base_load_precision8bitHow the base model is held while the adapter trains: 8bit or 4bit. Either way the hosted model runs on the unquantized base, so validation is measured at a different precision from the one that serves your model.You want a cheaper run: compare the estimates for both, and check the tuned model on your own test set.
system_promptnoneOne instruction added as the first system message of every example. See below.Every chat should follow one instruction you do not want to repeat in each.
early_stopping_patience0, offStop after this many checks without a lower validation loss.You want the run to stop once validation stops improving. See Evaluation and early stopping.
evaluation_cadencemanagedWhen validation runs.See Evaluation and early stopping, which also covers the three evaluation-pass settings.

system_prompt is one instruction for the whole job, added as the first system message of every example. It never affects inference: a hosted model (the API calls it an alias) answers exactly the messages you send it. If a selected example already has its own system message, creating the job with a system_prompt answers 422 and says how many conflict, rather than merging two sets of instructions.

Call it with the system prompt it was trained with​

A fine-tune learns to answer after the instruction it saw in training, whether that instruction was the job's system_prompt or a system message on every example. Called without it, the model is outside what it was trained on: it can ignore the task, and a small base can answer in another language. So send the same system message, first, in every request. For a fixed set of labels, also set temperature to 0.

The job detail (GET .../training-jobs/{job_id}) reports that prompt as training_system_prompt. It is null on the job list and for embedding jobs.

sourceMeaningtext
runThe job's own system_prompt.The prompt
examplesEvery training example began with the same system message.That message
mixedSome or all examples carried a system message, but not one shared by all of them.null
noneNo example had a system message and the job set none.null
not_recordedThe job was trained before this was recorded, or its dataset version was erased. It does not mean "none".null

It also carries examples_with_system_message, distinct_system_messages and examples, each null when not recorded. Nothing reads this at serving: the model still answers exactly the messages you send, so the prompt reaches it only when your request includes it. The playground fills it in for you, and the hosted model's "Use model" snippet sends it.

Estimate before you start​

GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/estimate-messages?tags=support-clean&model_name=ReOpenly/Qwen3.5-9B&num_train_epochs=3

tags is a comma-separated selection, untagged=true adds the chats with no tag (create's dataset_untagged), and the estimate accepts the same workload choices as create: model_name, num_train_epochs or max_steps, max_seq_length, per_device_train_batch_size, gradient_accumulation_steps, base_load_precision, warmup_steps (including 0; omit it for automatic warmup), and evaluation_cadence_kind with its matching evaluation_events or evaluation_interval_steps. If create will receive a job-wide system_prompt, send has_system_prompt=true: only whether one is set changes the estimate (its system_prompt check), and a prompt's text does not belong in a URL, which servers write to their access logs. The older system_prompt parameter still works but is deprecated.

The cost fields. Every amount is in US dollars; the names keep the word credits for compatibility:

FieldWhat it is
estimated_gpu_minutes, estimated_creditsThe forecast of billed training time and its price at credits_per_minute. This is what you should expect to pay; the final charge is measured.
authorization_gpu_minutes, authorization_creditsThe longest the run is allowed to take, including unbilled startup, and its price. It sets the run's time limit and must fit execution_limit_seconds. It is not a charge and not the balance you need.
required_creditsWhat your balance must cover to create the job: estimated_credits plus the safety margin.
credits_per_minuteThe current rate, in US dollars per minute of training time.
execution_limit_secondsThe platform's per-attempt time limit.

The amount that must be available to create the job is required_credits: estimated_credits plus a safety margin (70% by default). Your balance must also be above zero. With less, create answers 402 insufficient_credits. authorization_credits is not checked against your balance.

Readiness checks. This estimate and the embedding estimate (POST .../training-jobs/estimate) also return checks and ready: the checklist create runs before it starts a job, so you can show what is missing before anyone presses Start. Each check is {key, ok, code, message, required, available}. key is training_available, project, training_slot, selection, system_prompt (text), provider (embeddings) or credits; a failing check carries the code and message create would answer. Send the optional system_prompt query parameter to check the prompt create will receive. ready is true when every listed check is ok. The credits check gives required and available as exact decimal strings in US dollars, and it is left out while the selection check fails, because there is no run to price yet.

The estimate also returns the selection counts (selected_chats, selected_messages, trainable_chats, nonempty_text_messages, and is_trainable: false for an empty or unusable selection), the exact train/evaluation split (train_examples, eval_examples), planned_steps, steps_per_epoch, effective_batch_size, early_stopping_patience_max, training_plan (the training and evaluation schedule the quote was calculated from) and two previews:

{
"configuration_preview": {
"base_load_precision": "4bit",
"warmup_steps": 2,
"warmup_source": "automatic"
},
"evaluation_preview": {
"holdout_percent": 5,
"minimum_validation_examples": 8,
"selection_examples_required": 160
}
}

warmup_source is custom when you sent warmup_steps and automatic otherwise. The estimate uses the same arithmetic as create, but it is advisory: create performs its own final check.

Start an embedding run​

An embedding run trains on the training pairs of one embedding dataset. The New training screen and the API follow the same four calls, in order:

GET .../training-jobs/profiles base models and the bounds of every setting
POST .../training-jobs/preview the exact selection, split and steps
POST .../training-jobs/estimate what your balance needs to start
POST .../training-jobs start the run

Choose the dataset, a base model from the profiles (base_artifact_id), optional tag_ids to narrow the selection (pairs carrying any of the tags), and a whole-epoch max_steps. The preview returns selection.selection_sha256, the exact train/validation split, explicit-negative counts, the pairs and triplets scheduled per epoch, and planned_steps_per_epoch. Create requires that selection_sha256, so a run always trains on the selection you previewed. A preview is how you discover the batch count before you choose the horizon; estimate and create require a whole number of epochs. The preview checks your settings against the max_steps you send, so warmup_steps or early_stopping_patience above what that horizon allows is refused: discover the batch count with a large max_steps (up to 10,000), then estimate and create with the real one.

Each profile also publishes selection_minimums: examples, the fewest training pairs a selection needs, and independent_groups, the fewest groups of pairs that share no text. Validation holds out whole groups, so a selection where every pair answers the same query cannot be split. Fewer is refused with selection_empty or embedding_split_infeasible. For a dataset fed by Search feedback, readiness checks these before you preview.

A pair (an example with no negative) learns from the other passages in its batch, and two examples of the same query never share a batch, since each positive is a correct answer for the other. When a query has several positives and no negatives, as a search where every result was relevant produces, some of its pairs would have no batch partner. Each of those pairs instead receives, as its negative, a positive from another query in the same training split (never a passage known to answer its own query) and trains with the triplets. The preview's borrowed_negative_count reports how many training pairs were converted; the explicit-negative counts still describe your saved pairs. Your data is unchanged. Validation pairs use the same fallback: a validation pair with no partner borrows from the other validation examples first and otherwise from the training split, as a negative for validation only, so a small selection whose validation set is a single pair can still start. Training never borrows from validation. If a stranded training pair has no safe passage to borrow in the training split, the selection is refused with embedding_batches_infeasible. The smallest selections reach this: two pairs (one trains, one validates), or three pairs where two answer the same query or share a passage. Add a pair for another query, or give one example a negative passage.

The estimate. required_credits is the amount that must be available to start the run, as for a text run: your balance must be above zero and cover it, or create answers 402 insufficient_credits. When the run's base model, steps, sequence length and batch size are inside the range ReOpenly has measured, calibrated is true and estimated_credits is the measured training time with a safety margin (reason says so); required_credits equals it. Outside that range calibrated is false and estimated_credits is null: no measurement covers that run, which does not mean it is free, and required_credits is admission_ceiling_credits, the run's time limit (admission_ceiling_seconds) priced at the current rate. The time limit always applies; a run also pauses before your balance runs out. You pay only for the time actually used, and the job's cost_credits reports what was charged. A retry is checked the same way.

The estimate counts what your selection makes the run do: its steps, how much text it trains on, and how many evaluation checks it runs over your validation text. The measured range is each base's default profile at a sequence length of up to 512, with up to 10 evaluation checks (the default) and examples of up to 4,934 bytes on average: ReOpenly/Qwen3-Embedding-0.6B up to 584 steps at an effective batch of 32 and 7.77 MB of selected text, and ReOpenly/Qwen3-Embedding-4B up to 296 steps at an effective batch of 16 and 2.24 MB. At one epoch that is about 20,700 short pairs (around 350 bytes each) or 5,180 pairs of about 1,500 bytes on the 0.6B, and about 5,260 short pairs or 1,490 pairs of about 1,500 bytes on the 4B. Runs outside that range, and selections that cannot be scheduled yet, get no number until they are measured.

A shorter time limit. Preview, estimate and create also accept an optional top-level execution_limit_seconds (not part of settings), an integer of at least 5 seconds that cannot exceed the platform's limit. Omitting it keeps the platform's limit. Send the same value with all three requests. Create freezes it for the job; retry and resume keep it, even after the platform limit is raised, and a platform limit lowered below it refuses retry and resume rather than changing the job. GET .../retry-estimate quotes the same frozen limit at the current rate. The limit applies separately to each attempt, including model and data preparation; time in the queue does not count. It is not a spending limit across retries and resumes, and only measured training time is billed. A short limit can expire before training starts or before the requested checkpoint is reached.

Embedding settings​

Preview, estimate and create accept an optional settings object. GET .../profiles publishes, for each base model, every setting's range and default as setting_bounds: read them there rather than copying the defaults below, which are today's for ReOpenly/Qwen3-Embedding-0.6B (where the 4B base differs, the table says so). A refused value answers 422 with detail.field.

SettingDefaultWhat it doesChange it when
learning_rate0.0002The optimizer's rate.The validation loss is lowest early and then rises (lower it), or is flat from the first check (raise it, or add data).
warmup_steps0Steps over which the rate ramps up to learning_rate.Rarely. It must fit the run's steps, or the preview refuses it.
per_device_train_batch_size32; 16 on 4B, its maximumExamples per batch. Every other example in a batch serves as a negative, so larger batches give harder training signal.You want more in-batch negatives. A larger batch also means fewer steps per epoch.
gradient_accumulation_steps1Averages gradients over several batches. It adds no negatives.You want a step to average over more examples without changing the negatives each example sees.
loss_scale20The temperature of the contrastive loss.You set normalize_embeddings to false, which requires 1.
per_device_eval_batch_size0, automatic0 picks automatically from the training batch and the profile's memory_tokens.Rarely.
evaluation_checks10How many validation checks the run makes (1 to 10). With fewer than four, the learning rate decays linearly instead of halving on a plateau.Rarely: the kept checkpoint is chosen among these checks.
early_stopping_patience0, offStop after this many checks without improvement, keeping the best checkpoint.You want the run to stop once validation stops improving.
max_examples_per_query16The most examples one query may contribute.A few queries have many examples and you do not want them to dominate the run.
lora_rank, lora_alpha16, 32The adapter's shape. A higher rank makes a larger adapter; it is applied at alpha ÷ rank.You are comparing runs on your own test set. Change alpha with the rank.
lora_dropout0Dropout on the adapter, during training only.You are comparing runs on your own test set.
query_instructionemptyOne line (up to 1,024 characters) put before every query in training, validation, the API and Search. Documents never get it.Your queries are a different kind of text from your passages, such as short questions against long documents.
output_dimensionsthe base's full size: 1,024, or 2,560 on 4BThe vector size the model is trained at and returns, from the sizes setting_bounds lists.You need smaller vectors, for storage or for search speed.
max_seq_length512Tokens per training example. A model trained above 512 accepts inputs up to its training length; one trained at 512 or less accepts 512. Up to 2,048 on 0.6B, 512 on 4B.Your passages are longer than 512 tokens.
training_modeqlora_4bitHow the base model is held while the adapter trains: qlora_4bit uses the least memory, lora_8bit sits between, lora_16bit trains against the same weights the hosted model uses. 4B offers qlora_4bit only.You want validation measured on the weights that serve your model (lora_16bit). Compare the estimates first.
normalize_embeddingstruefalse returns raw vectors whose length carries meaning, compared by dot product; it requires loss_scale 1.Your search compares vectors by dot product and needs their length.

With accumulation, max_steps counts optimizer steps; the preview's planned_steps_per_epoch gives the number per epoch.

Validation and the kept checkpoint​

About 10% of the selection is held out for validation, always as whole groups of examples that share any text, so nothing held out is also trained on. Large groups stay in training when smaller groups can provide validation. The actual fraction can differ from 10% because groups are indivisible; check its counts in the preview. Existing frozen versions keep their original split. The run checks the validation loss up to ten times (the last at its final step): the same contrastive loss it trains on, computed on the held-out examples at the vector size and similarity the model is served with (cosine for normalized vectors, dot product for raw ones). The kept checkpoint is the one with the lowest loss, the earliest on a tie. With at least four checks, two checks in a row without a new best halve the learning rate; with fewer, the rate decays linearly. Runs started before this rule keep their own: they kept the checkpoint with the best validation nDCG@10, and their job page still shows it.

That loss only chooses a checkpoint: it is measured during training, which can hold the base model at a lower precision than the hosted model uses, so it is not a measure of retrieval quality. A successful model can be hosted without any further evaluation.

Reading an embedding run. The job page draws the validation loss at each check (lower is better) and marks the kept checkpoint.

  • Still falling at the last check: more epochs may help.
  • Falling, then flat: more epochs will not help; the run already kept its best check.
  • Lowest, then rising: the model is fitting the training pairs more than the held-out examples. The kept checkpoint is the lowest point; next time try fewer epochs, a lower learning rate, or early stopping.
  • Flat from the first check: try a higher learning rate or more data.

Evaluation and early stopping​

For a text run, a small share of a large enough selection is held out for evaluation and never trained on. Which examples are held out is a property of your dataset: every run over an unchanged dataset uses the same ones, which makes runs comparable. The policy assigns 5% to evaluation, needs at least 8 evaluation examples, and caps the set at 512:

candidate_eval = floor(usable_examples × 0.05)
eval_examples = 0 if candidate_eval < 8 else min(candidate_eval, 512)
train_examples = usable_examples - eval_examples

So evaluation starts at 160 usable examples; a smaller selection trains on all of its examples and reports no evaluation loss.

You can choose when evaluation runs:

{"evaluation_cadence": {"kind": "events", "events": 10}}

or {"evaluation_cadence": {"kind": "fixed_interval", "interval_steps": 300}}. An event budget is 1 to 100, and a fixed interval may resolve to at most 100 checks; both include the final step exactly once. Without a cadence the run schedules about ten checks per epoch, at least two and at most fifty, and the job shows it as Managed.

The served model is the kept checkpoint: the one with the lowest validation loss across the run, not necessarily the last one; on a tie the earlier checkpoint is kept. Validation loss measures next-token prediction on held-out rows that are also reused to select the checkpoint, so it is a selection signal, not task accuracy. Keep an untouched test set outside the training selection and compare the tuned model with the base model on it before relying on it.

Early stopping is off unless you ask for it. Send early_stopping_patience (1 or more) to stop once evaluation loss has not improved for that many checks. A run that stops early still ends succeeded, before planned_steps. The estimate returns early_stopping_patience_max, two fewer than the scheduled checks (the first check sets the baseline and the final one cannot shorten the run), so a schedule with fewer than three checks allows only 0.

Three settings control how an evaluation pass runs. They change neither which rows are evaluated nor when, so they cannot change what the run learns; they exist because evaluation is where a long run is most likely to run out of memory.

SettingDefaultWhat it does
per_device_eval_batch_size0Evaluation batch size; 0 means the training batch size. Lowering it is the first fix for an evaluation out-of-memory failure.
fp16_full_evalfalseHalf-precision evaluation uses less memory but changes the numerics of the loss that selects the model.
eval_accumulation_steps1Evaluation output buffering; see below.

Evaluation output buffering​

eval_accumulation_steps is the Evaluation output buffering control. The value 1 means evaluation output is collected at the end of each check, shown in the app as End of check (default); it is not a one-step interval. Custom intervals run from 2 to 32. Smaller intervals move output more often and can reduce buffer memory, at some cost in speed. Buffering does not split evaluation batches: for an evaluation out-of-memory failure, lower the evaluation batch size first, then consider half-precision evaluation, and only then change buffering.

Reading the loss charts​

  • Falling training loss means the model fits the training examples more closely; it does not by itself show that answers improved.
  • Validation loss measures prediction on examples that did not update the model; lower is better when comparing checkpoints of one run.
  • Training loss falling while validation loss rises suggests overfitting: try fewer epochs or a lower learning rate and compare on the same dataset.
  • The learning-rate and gradient-norm charts are diagnostics, not scores: read their shape within a run rather than any absolute value.

A finished job that evaluated has an evaluation block: the lowest loss and its step, the last loss and step, how many checks ran, and which checkpoint is served. promoted_before_last_eval: true says the served checkpoint is earlier than the last check. A job that never evaluated reports evaluation: null.

Follow a run​

Read the job with GET .../training-jobs/{job_id}. It reports status, progress (percent of the planned steps), the frozen configuration, cost_credits (the actual charge; 0 when nothing was charged) and model_available. To read a job by its run number instead of its id:

GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{number}?identifier=number

Jobs are never deleted, so numbers never shift; hosted-model and billing responses show the same value as training_job_number.

Monitor the loss through the API. The job detail (not the list) includes metrics_summary, with two objects:

  • latest: the most recent value of each series the run reports, such as loss (training loss), eval_loss (validation loss), learning_rate, grad_norm, epoch, train_step and eval_step (the steps those values belong to). For a running job this is where it is now; for a finished one, where it ended.
  • summary: end-of-run figures once the run reports them: train_loss, train_runtime (seconds, summed across resumes), train_samples_per_second and train_steps_per_second.
{
"status": "running",
"progress": 47.4,
"metrics_summary": {
"latest": {"loss": 1.21, "learning_rate": 0.00018, "epoch": 1.4, "train_step": 27, "eval_loss": 1.35, "eval_step": 25},
"summary": {}
}
}

A series the run has not reported is absent, and metrics_summary is null until the run reports anything: that means nothing was recorded yet, not a loss of zero. The full series are in metrics, one list per name, with train_step and eval_step giving each value's step.

Waiting for compute. When no training capacity is free, a new job stays pending with dispatch_status: "waiting_for_capacity" and starts automatically when capacity frees up. Time spent waiting is not charged, and it does not count toward the run's time limit. Each account still has one active training run.

Preparation. A new job first copies its selected examples, exactly as they are, into a frozen record: editing or deleting them later cannot change what the job trains on, and a retry trains on the same data. preparation moves through queued, snapshotting, then verified, failed or cancelled; training starts only after verified. A preparation failure is an input failure (failure_category: "input") and is not charged. A job created before this step existed reports preparation: null.

Timing. timing breaks the run into queued_seconds, preparing_seconds, training_seconds, post_processing_seconds and finalizing_seconds, with total_seconds (active time), elapsed_seconds (wall clock) and idle_seconds (the difference, such as the time before a retry). A phase without reliable timestamps is omitted rather than guessed. These are not the billed interval; see Billing and limits.

Cost so far. A training run is charged when each attempt ends, so the job detail (not the list) also carries cost_so_far, which moves while the run trains. It adds the charges already on your statement to the training time of the attempt not charged yet, measured from its first training step to now and priced the way the charge will be (rounded up to 0.1 s, then at the per-minute rate in force when the attempt started, which applies to the whole run even if the rate changes meanwhile). When that attempt is charged, the figure equals the charge.

FieldMeaning
statenot_started (no training yet: every amount is null, never 0), training (the figure grows), awaiting_charge (training ended and the last part is being charged) or charged (the figure is your statement).
cost_creditsCost so far in US dollars: charged_credits (on your statement) plus accruing_credits (not charged yet).
billable_secondsTraining seconds across attempts.
rate_credits_per_minuteUS dollars per minute of training.
balance_creditsYour available balance now.
pauses_atWhile the job is running, pausing or paused: remaining_credits (your balance less the training not yet charged on all your runs), covers_seconds (how much more training that pays for), next_checkpoint_credits (what training on to the next checkpoint is expected to cost, with the safety margin), guarded (whether ReOpenly will pause this run before the balance runs out), pause_imminent (the balance no longer covers the next checkpoint, so the run pauses there), paused_for_balance and pause_reason.
{
"status": "running",
"cost_so_far": {
"state": "training",
"billable_seconds": 439.8,
"cost_credits": 0.2932,
"charged_credits": 0.0,
"accruing_credits": 0.2932,
"rate_credits_per_minute": 0.04,
"balance_credits": 4.5,
"pauses_at": {
"remaining_credits": 4.2068,
"covers_seconds": 6310,
"next_checkpoint_credits": 0.12,
"guarded": true,
"pause_imminent": false,
"paused_for_balance": false,
"pause_reason": null
}
}
}

An attempt that fails is not charged, so if the live attempt fails its part leaves the figure. The app's job page shows the figure as "Cost so far" and updates it while the page is open.

Why it ended. A finished job carries outcome.stop_reason: completed, max_steps, early_stopping, cancelled or execution_deadline. outcome.downgrades lists settings the run could not apply as sent, as setting:action:cause tokens (for example early_stopping:disabled:no_eval_set when early stopping was asked for without an evaluation set). outcome: null means the run reported nothing, as for jobs that never reached training.

Environment. The Run card records the hardware the run used (GPU model and count, memory, driver and framework versions) and the frozen per-minute rate. These explain why similar runs can differ in price or behavior; they are not quality scores.

The data it trained on. A job's detail includes the first 50 frozen examples; the rest are paged, up to 200 at a time:

GET .../training-jobs/{job_id}/dataset?offset=0&limit=25
POST .../training-jobs/{job_id}/dataset/search {"offset":0,"limit":25,"search":"invoice","split":"eval"}
GET .../training-jobs/{job_id}/dataset/{chat_id}

Each item says whether it was train or eval input. search matches frozen text, and a searched page returns total: null. These read the frozen record, not your current data.

Attempts and logs. A job runs as one or more attempts (a retry or a resume adds one). The attempts route returns each attempt's status (see Attempt statuses), timestamps, failure code and log metadata; the logs route returns the attempt's log as newline-delimited JSON, with offset and limit in bytes. log_complete: true (and the header X-Log-Complete: true) marks a complete log. After an abrupt stop the log is the last saved copy: integrity-checked but possibly missing the final output, marked log_complete: false and log_recovered: true.

Pause, resume, finish and cancel​

Which control applies depends only on whether training has begun:

PhaseControlResult
Queued or preparingPOST .../cancelThe job settles cancelled. Nothing was learned, so there is no model and no charge.
TrainingPOST .../pause (Stop in the app)The run trains on to its next checkpoint and settles paused.
PublishingneitherTraining is over and the model is moments away.

The server enforces the boundary, because a client only sees progress after the fact: cancel answers 409 training_job_already_training once training has begun, and pause answers 409 training_job_not_training_yet before it.

A pause is not immediate, and the wait is billed. It is acknowledged at once, but the run continues to its next checkpoint, the only point it can later resume from. pause.steps_until_pause and pause.next_boundary_step on the job say how far that is, and the app shows them before you confirm. Checkpoints are at most 25 steps apart, so a pause trains at most 25 more steps. Pausing before the first checkpoint still works and can take longer. When no checkpoint remains both values are null (the pause is then effectively the end of the run); a job without a pause block cannot be paused. A pause that arrives after the last checkpoint lets the run finish normally, and it settles succeeded with its model.

A run is also paused when your balance runs low. While a job trains, ReOpenly compares your balance with the training time the run has used and not yet been charged for. When what is left would no longer cover training up to the run's next checkpoint, plus a safety margin, the platform requests the same pause as Stop: the run trains on to that checkpoint, is charged for the training time up to it, and settles paused. This applies to text and embedding runs alike. It never happens before training begins (nothing is charged yet) or after the last checkpoint (the run finishes instead). Every job carries pause_reason: "owner" when you paused it, "insufficient_credits" when the platform did, and null when no pause was requested or the reason was not recorded. To continue, add funds and resume; resume checks your balance like a retry and answers 402 insufficient_credits until it is enough. Finish costs nothing. While the run trains, cost_so_far.pauses_at says how much more training your balance covers and whether this pause is due (see Follow a run). See Low balance.

A paused job offers two operations:

OperationResult
POST .../resumeContinues from the checkpoint; charts and the kept checkpoint carry on where they stopped. Takes no body and requires an Idempotency-Key header.
POST .../finishPublishes the model the run reached and settles succeeded. Free: the training time was charged when the pause settled.

Resume needs a checkpoint to continue from. checkpoint_available on the job detail is true when the paused run has a verified checkpoint, written over the same examples, with training still left; the app offers Resume only then. When it is false the run cannot continue: .../resume answers 409, and you start a new run instead (Finish still settles the run). The field is false on every job that is not paused, and null on the job list, which does not read checkpoints.

Embedding runs have the same three controls. An embedding run writes a checkpoint at every validation check, so pause.next_boundary_step is the next check before the final step, and the distance is the run's evaluation cadence rather than the 25-step bound above. Finish publishes the checkpoint with the best held-out score so far, the one the run would have kept had it ended there, which can be earlier than the checkpoint the pause stopped at. Both ReOpenly/Qwen3-Embedding-0.6B and ReOpenly/Qwen3-Embedding-4B support stopping at a checkpoint and resuming from it. Resume preserves the kept checkpoint even when it was written by an earlier attempt; missing or unverifiable checkpoint files are refused. A failed run can also be retried from the start.

Embedding resumes keep the job's frozen learning-rate schedule. Older profiles that did not record a schedule retain linear decay. The checkpoint must still verify, and the frozen base must remain eligible for training. When early stopping is enabled, the count of consecutive evaluations without improvement also continues from the checkpoint. An incomplete evaluation history or a checkpoint that already reached early stopping cannot restart training. If an embedding run reaches early stopping at the requested pause checkpoint, it finishes with early_stopping rather than entering paused.

There is no cancel for a paused job (409): it has already trained and been charged, so discarding its model would help no one. Finish publishes the kept checkpoint, or, for a run with no evaluation set, the last checkpoint: the same model the run would have produced by ending there. If publishing cannot verify the model, the job settles failed with no further charge and can be retried. Resume and finish refuse each other with training_job_finalizing.

When a run reaches its time limit it stops itself, keeps the checkpoint it would have selected, settles succeeded and reports outcome.stop_reason: "execution_deadline". It is charged for the time it trained and can be resumed for the remaining steps.

Retry​

A failed or cancelled job can be retried. A failed job never retries itself: ReOpenly keeps the evidence and any verified checkpoint, and you decide whether to run again.

curl -X POST "https://reopenly.com/api/v1/projects/<owner>/<project>/training-jobs/42/retry" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Idempotency-Key: 8f8d8ac4-8de5-4c63-a8f4-f0a39db1af4d" \
-H "Content-Type: application/json" \
-d '{"resume_from_checkpoint": false}'

.../retry and .../resume require an Idempotency-Key header: repeating a request with the same key returns the first result instead of starting a second run. A retry reuses the job's frozen settings and frozen data; it never re-reads the dataset, and a job whose frozen data no longer exists cannot be retried. resume_from_checkpoint: true continues from a verified checkpoint of the same frozen input when one exists. A job whose frozen lora_rank is above today's largest choice keeps reading and downloading as it ran, but its retry answers 409 unsupported_value for lora_rank: start a new job instead.

GET .../retry-estimate says whether a retry is possible (eligible), whether a checkpoint can be resumed (checkpoint_available, checkpoint_step), your available_credits, and estimated_credits: the amount that must be available for the retry. It starts nothing. With less, retry answers 402 insufficient_credits.

Download​

When model_available is true, download the trained adapter:

GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/download?format=lora
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/download-metadata

download streams a gzip-compressed tar archive of the adapter files. download-metadata lists the same files, each with its path and size_bytes, and the total size_bytes, without downloading.

  • Text models: the archive holds the adapter files only. There is no checksum manifest; compare the files you receive with the paths and sizes from download-metadata.
  • Embedding models: the archive also includes manifest.json, with the SHA-256 checksum and byte size of every file, including the adapter config. Use it to verify the download.

A job without a model answers 400. To call the model instead, host it under Hosted models.

Reference​

Routes​

GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/estimate-messages text
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/profiles embedding
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/preview embedding
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/estimate embedding
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/pause
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/resume
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/finish
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/cancel
POST /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/retry
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/retry-estimate
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/attempts
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/attempts/{attempt_id}/logs
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/dataset
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/download
GET /api/v1/projects/{owner_slug}/{project_slug}/training-jobs/{job_id}/download-metadata

Every field of every request and response is in the API reference. The list always returns {data, next_cursor, total_count} with an optional limit (25 by default, at most 100). Pass cursor=<next_cursor> unchanged for the next page. A malformed cursor or one from another project answers 400.

Job states​

StatusMeaning
pendingAccepted and waiting to start, including while waiting for compute.
runningPreparing, training, or publishing the model.
cancel_requestedCancelled before training began; the run is being stopped.
pause_requestedPausing: the run trains on to its next checkpoint, and those steps are billed. pause_reason says whether you or a low balance asked for it.
pausedStopped at a checkpoint with everything kept. Resume it or finish it. A paused job does not hold your active-training slot.
succeededThe model was verified and published.
failedThe run ended without a model.
cancelledCancelled before training began: no model, no charge.

Use model_available, not the status, to decide whether a model can be hosted or downloaded: some older stopped jobs are cancelled and still have a model.

Attempt statuses​

StatusMeaning
leasedCompute was reserved for this attempt; it has not started yet.
acceptedThe compute accepted the run, and it is starting.
startedThe run is preparing or training.
finalizingTraining ended; the model is being verified and published.
succeededThe attempt completed.
failedThe attempt ended with a failure code.
cancelledThe attempt was stopped: cancelled before training, or settled by a pause.
expiredContact with the run was lost and the attempt was closed.
submission_uncertainReOpenly could not confirm the run was accepted, so it does not start a duplicate.

Billing and limits​

Only the training loop is billed: for each attempt, from its first training step to the moment training ends. Queueing, preparation (loading the model, reading and tokenizing your data) and publishing the model are not charged, and a run that never begins training is free. An attempt that fails is not charged, even if it trained for a while; time already charged when an earlier pause settled stays charged. cost_credits is the actual charge in US dollars, from your statement. See Pricing and billing.

The estimate is calibrated on measured runs at an effective batch of 8 (per_device_train_batch_size 2 × gradient_accumulation_steps 4) and 8-bit loading. Other shapes are priced with a safety margin, and a batch below 8 is priced as 8. To enlarge the effective batch, raise gradient_accumulation_steps rather than per_device_train_batch_size: a larger per-device batch needs more memory per step and, near the limit of the training hardware, can slow every step far more than its size suggests. Sending num_train_epochs rather than max_steps keeps the length of a run tied to your data when you change the batch.

A run's time limit must fit the platform's execution limit, six hours by default. Read the current value from execution_limit_seconds in the estimate, or from duration_components.execution_limit_seconds on POST /api/v1/pricing/estimate, rather than hard-coding it. A run that does not fit is refused before it starts with training_duration_exceeds_limit (422 on create, 409 on retry): reduce num_train_epochs, max_seq_length or the selection.

Failure codes​

Failure codes are stable, and none carries raw system output. The code names are fixed; the meaning column says what happened in plain words.

CodeWhat happened
training_exceeds_provider_limitRun too long. The run is longer than ReOpenly can execute in one go. Nothing started; reduce epochs, sequence length or the selection.
worker_disk_exhaustedOut of storage. The run ran out of storage space.
provider_failedRun failed. The run failed while executing.
provider_execution_timeoutTime limit reached. The run exceeded its time limit.
provider_ttl_expiredWaited or ran too long. The run waited or ran longer than allowed and was closed.
provider_callback_missingStopped reporting. The run stopped reporting progress and was closed.
provider_terminal_callback_missingEnded without a model. The run ended without delivering a verified model.
provider_result_unavailableResult unavailable. The run's result could not be retrieved.
provider_status_unavailableState unknown. The run's state could not be confirmed after repeated checks.
provider_cancelledStopped by ReOpenly. The run was stopped without a request from you.

A failed attempt is not charged, and you can retry the job.