Concepts

Verification

How GPU Router checks that a run did the work, and why a run that exited 0 can still not count.

Every run has two separate outcomes. Execution is whether the container finished: the run's status. Verification is whether its outputs prove the work happened: the run's verification_status. Only a run that succeeded and did not fail verification is used to pick a GPU or to finish a job.

Add a verifier to the spec#

A verifier is optional and lives in job_spec.verifier. Paths are relative to output_dir.

"verifier": {
  "expected_output_files": ["adapter/adapter_config.json", "adapter/adapter_model.safetensors"],
  "metrics_file": "metrics.json",
  "metric_must_decrease": "loss"
}
FieldRule
expected_output_filesAt least one relative path, no ... Every file must exist in the run's outputs.
metrics_fileA relative path to a file that parses as a JSON object.
metric_must_decreaseA name m. The metrics file must hold numbers initial_m and final_m, with final_m lower.

For the LoRA sample, the job writes a metrics.json like this:

{"initial_loss": 3.599637269973755, "final_loss": 2.2118358612060547, "steps": 32}

How the checks run#

Verification runs once, after a run ends in succeeded. GPU Router reads the run's output volume and runs the checks in order. The first failing check stops the rest.

  1. expected_output_files: lists the outputs and looks for each file.
  2. metrics_file: reads the file and parses it as a JSON object.
  3. metric_must_decrease: compares final_m with initial_m.

If reading the outputs fails, the check fails with the reason, for example Listing outputs failed: TimeoutError. The result is stored once and never recomputed.

Statuses#

verification_statusMeaning
not_requestedThe spec has no verifier. The run counts on its execution status alone.
pendingThe spec has a verifier and the run has not been verified. It stays pending when the run ended other than succeeded.
passedEvery check passed.
failedA check failed. The run does not count, even though it executed.

Run statuses, for comparison: accepted, launching, running and cancel_requested are active; succeeded, failed, cancelled and lost are final. lost means GPU Router lost track of the run: the launch timed out or never returned a reference, the provider has no record of it, or status polls failed with a non-transient error GPU_ROUTER_POLL_RETRIES times in a row (default 5).

Execution success is not verification success#

Run statusVerificationCounts?What happens
succeededpassedYesUsed for cost per unit; a job ends done with "Finished and verified on GPU."
succeedednot_requestedYesUsed for cost per unit; a job ends done.
succeededfailedNoA benchmark run is excluded with verifier failed: <reason>; a job ends failed with "the verifier failed".
failed, cancelled, lostpendingNoA benchmark run is excluded with run ended <status>; a job ends failed.

Measurements reused across jobs must have passed verification or have none requested. A webhook for a run that ended before verification says not verified (run failed).

Read the report#

curl -s https://gpu-router.com/v1/runs/$RUN_ID/verification -H "Authorization: Bearer $GPU_ROUTER_API_KEY"
gpu-router verification $RUN_ID
{
  "run_id": "29441b0672bd4882a12b581d3fc09081",
  "verifier_version": "1",
  "status": "passed",
  "checks": [
    {"name": "expected_output_files", "passed": true, "reason": "all 2 expected files are present"},
    {"name": "metrics_file", "passed": true, "reason": "metrics.json parsed as a JSON object with 3 keys"},
    {"name": "metric_must_decrease", "passed": true, "reason": "final_loss 2.2118358612060547 decreased from initial_loss 3.599637269973755"}
  ],
  "outputs": ["metrics.json", "adapter/adapter_model.safetensors", "adapter/adapter_config.json", "adapter/README.md"],
  "metrics_sha256": "7d04fb79c8b16e1defb450bdf09f8b5970787ccbf3ea13e3a346f33cad2328a3",
  "checked_at": "2026-10-14T04:10:44.986747Z"
}

metrics_sha256 is the sha256 of the metrics file as read, so you can prove which file was checked. Without a report the endpoint answers 404 VERIFICATION_NOT_FOUND, saying whether verification is pending or not requested.

Next steps#