Runs

Cancel run

Ask the provider to stop a launching or running run; a later poll records cancelled.

POST/v1/runs/{id}/cancelAPI key

Authorization

Send Authorization: Bearer gr_... with a key from the Developer access page. The browser session cookie gpu_router_session also works.

Path parameters

idstringrequired

Responses

202application/json

The run in status cancel_requested. Only a later status poll moves it to cancelled, or to succeeded when the run completed first; a run already in cancel_requested is returned unchanged.

Show response attributes
idstringrequired
route_idstringrequired
user_idstringrequired
idempotency_keystringrequired
providerenum<string>required

Available options: modal lambda

gpuenum<string>required

Available options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300

provider_run_refstring | nullrequired
statusenum<string>required

Available options: accepted launching running succeeded failed cancel_requested cancelled lost

provider_confirmedbooleanrequired

Whether the provider observed the current status.

verification_statusenum<string>required

Available options: not_requested pending passed failed

exit_codeinteger | nullrequired
log_tailstring | nullrequired
created_atstring<date-time>required
launched_atstring<date-time> | nullrequired
started_atstring<date-time> | null

When the provider first reported the run running or finished; null if it never started.

finished_atstring<date-time> | nullrequired
status_checked_atstring<date-time> | nullrequired
last_errorstring | nullrequired
poll_failuresintegerdefault: 0

Consecutive failed status polls; reset by a successful poll.

kindenum<string>default: "job"

job for a run of the route's job, probe for a capped benchmark run on one candidate GPU.

Available options: job probe

benchmarkobject | null

The benchmark protocol settings of a probe run; null for a job run.

Show child attributes
benchmark_idstringrequired

Groups the runs of one Benchmark my job request.

repeatintegerrequired

1-based repeat of this run on its GPU.

runs_per_gpuintegerrequired
work_stepsintegerrequired

Steps (training) or requests (inference) every run performs, sent as GPU_ROUTER_MAX_STEPS or GPU_ROUTER_MAX_REQUESTS.

seedintegerrequired

Sent to every run as GPU_ROUTER_SEED.

max_secondsintegerrequired

Sandbox timeout of every run.

loss_tolerance_pctstring | nullrequired

Allowed final-loss distance from the median across GPUs, in percent; null disables the check.

pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

cap_usdstringrequired

Hard cap of the whole benchmark: rate x GPUs x max_seconds x runs_per_gpu, summed over GPUs.

pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

simulationobject | null

Set only on a simulated run of a sample job or a demo account's job: nothing was launched or billed, and it never counts as a measurement.

Show child attributes
duration_secondsstringrequired

Measured duration shown for the run, not its wall time.

pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

cost_usdstring | nullrequired

Simulated cost: duration_seconds at usd_per_gpu_hour of provider_name; nothing is billed.

pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

basisstringrequired

Where the duration comes from: the one verified sample run on this GPU the run replays, named by run id.

provider_namestringdefault: "Modal"

Provider whose listed rate prices the simulated cost.

usd_per_gpu_hourstring | null

That provider's listed rate per GPU-hour; null without one.

pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

served_runstring | null

Id of the verified sample run whose duration, metrics, outputs and log the run replays.

samplestringdefault: "lora"

Id of the gpu-router sample whose outputs the run serves.

stalebooleanrequired

True when the run is not terminal and its status was last checked (or, before any check, it launched or was accepted) more than 5 poll intervals ago.

provider_referenceobject | nullrequired

The Modal sandbox and app behind the run and its dashboard link; null when the run never launched.

Show child attributes
sandbox_idstringrequired
app_namestringrequired
dashboard_urlstringrequired
volume_namestringrequired
storage_urlstringrequired
401application/json

UNAUTHENTICATED: missing, invalid, expired, or revoked session or API key.

UNAUTHENTICATED
403application/json

CSRF_ORIGIN_MISMATCH: the Origin header does not match the public URL.

CSRF_ORIGIN_MISMATCH
404application/json

RUN_NOT_FOUND: no run with this id belongs to the signed-in user.

RUN_NOT_FOUND
409application/json

RUN_NOT_CANCELLABLE: the run is already succeeded, failed, cancelled, or lost, or has no provider reference yet.

RUN_NOT_CANCELLABLE
429application/json

RATE_LIMITED (retryable): the signed-in user made more than GPU_ROUTER_RATE_PER_MINUTE mutating requests in the last minute. Nothing was changed.

RATE_LIMITED
500application/json

Unexpected failure: INTERNAL_ERROR.

INTERNAL_ERROR
502application/json

AUTH_PROVIDER_REJECTED: the provider refused the request (not retryable).

AUTH_PROVIDER_REJECTED
503application/json

AUTH_NOT_CONFIGURED (not retryable) or AUTH_PROVIDER_UNAVAILABLE (retryable).

AUTH_NOT_CONFIGUREDAUTH_PROVIDER_UNAVAILABLE

MCP tool

cancel_run: Request cancellation of a launching or running run (RUN_NOT_CANCELLABLE otherwise) and return it in status cancel_requested; Modal stops billing once the sandbox ends. Free.