Benchmarks
Start benchmark
Paid: launch probes on the chosen GPUs in your account, capped at max_cost_usd. Needs confirm true and an Idempotency-Key; read GET /v1/routes/{id}/benchmark/quote first.
Authorization
Send Authorization: Bearer gr_... with a key from the Developer access page. The browser session cookie gpu_router_session also works.
Headers
Idempotency-Keystring | nullRequired and non-empty; missing or empty answers 400 IDEMPOTENCY_KEY_REQUIRED
Path parameters
idstringrequiredBody
gpusenum<string>[]required2 or 3 candidate GPUs of the route.
Available options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
minItems: 2
maxItems: 3
max_secondsintegerrequiredEach run's sandbox timeout: it is stopped after this many seconds.
minimum: 30
maximum: 3600
max_stepsinteger | nullWork every run performs: steps for training, sent as GPU_ROUTER_MAX_STEPS, or requests for inference, sent as GPU_ROUTER_MAX_REQUESTS. Defaults to 50.
minimum: 1
runs_per_gpuintegerdefault: 3Repeats on each GPU, 1 to 5.
minimum: 1
maximum: 5
seedintegerdefault: 0Sent to every run as GPU_ROUTER_SEED.
minimum: 0
maximum: 4294967295
loss_tolerance_pctnumber | string | nullExclude runs whose final loss is further than this from the median across GPUs.
maximum: 100
exclusiveMinimum: 0
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
max_cost_usdnumber | stringrequiredThe hard cap the user saw; the computed cap must not exceed it.
exclusiveMinimum: 0
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
confirmbooleandefault: falseMust be true: the user accepts that Modal bills up to the cap.
Responses
202application/jsonThe benchmark: the first run on each chosen GPU is launched, repeats follow as each finishes; a repeated Idempotency-Key returns it without launching again.
Show response attributes
route_idstringrequiredprobesobject[]requiredThe runs of the latest benchmark, in launch order.
Show child attributes
idstringrequiredroute_idstringrequireduser_idstringrequiredidempotency_keystringrequiredproviderenum<string>requiredAvailable options: modal lambda
gpuenum<string>requiredAvailable options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
provider_run_refstring | nullrequiredstatusenum<string>requiredAvailable options: accepted launching running succeeded failed cancel_requested cancelled lost
provider_confirmedbooleanrequiredWhether the provider observed the current status.
verification_statusenum<string>requiredAvailable options: not_requested pending passed failed
exit_codeinteger | nullrequiredlog_tailstring | nullrequiredcreated_atstring<date-time>requiredlaunched_atstring<date-time> | nullrequiredstarted_atstring<date-time> | nullWhen the provider first reported the run running or finished; null if it never started.
finished_atstring<date-time> | nullrequiredstatus_checked_atstring<date-time> | nullrequiredlast_errorstring | nullrequiredpoll_failuresintegerdefault: 0Consecutive 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 | nullThe benchmark protocol settings of a probe run; null for a job run.
Show child attributes
benchmark_idstringrequiredGroups the runs of one Benchmark my job request.
repeatintegerrequired1-based repeat of this run on its GPU.
runs_per_gpuintegerrequiredwork_stepsintegerrequiredSteps (training) or requests (inference) every run performs, sent as GPU_ROUTER_MAX_STEPS or GPU_ROUTER_MAX_REQUESTS.
seedintegerrequiredSent to every run as GPU_ROUTER_SEED.
max_secondsintegerrequiredSandbox timeout of every run.
loss_tolerance_pctstring | nullrequiredAllowed final-loss distance from the median across GPUs, in percent; null disables the check.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cap_usdstringrequiredHard cap of the whole benchmark: rate x GPUs x max_seconds x runs_per_gpu, summed over GPUs.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
simulationobject | nullSet 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_secondsstringrequiredMeasured duration shown for the run, not its wall time.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cost_usdstring | nullrequiredSimulated cost: duration_seconds at usd_per_gpu_hour of provider_name; nothing is billed.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
basisstringrequiredWhere 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 | nullThat provider's listed rate per GPU-hour; null without one.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
served_runstring | nullId 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.
stalebooleanrequiredTrue 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 | nullrequiredThe Modal sandbox and app behind the run and its dashboard link; null when the run never launched.
Show child attributes
sandbox_idstringrequiredapp_namestringrequireddashboard_urlstringrequiredvolume_namestringrequiredstorage_urlstringrequiredrankingobject[]requiredEvery candidate: qualified GPUs first by median cost per unit, then running and failed ones, then the rest by the route's estimate or rate.
Show child attributes
rankintegerrequiredgpuenum<string>requiredAvailable options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
providerstringrequiredmodal for a GPU that can be probed; quote or nationalcompute for an offer ranked by its rate only.
provider_namestringrequiredbasisenum<string>requiredAvailable options: measured (probe) probe running probe did not finish estimated rate only no listed rate
usd_per_gpu_hourstring | nullrequiredpattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cost_usdstring | nullrequiredMedian measured GPU cost of the qualified benchmark runs; null without them.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
duration_secondsstring | nullrequiredMedian measured run duration of the qualified benchmark runs; null without them.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
estimated_cost_usdstring | nullrequiredThe route's full-job estimate for this candidate, for reference.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
run_idstring | nullrequiredThe latest benchmark run on this GPU; null when it was not probed.
usd_per_unitstring | nullMedian USD per 1k steps or per 1M tokens; the measured rows rank on it.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
fingerprintstringrequiredsha256 of the job; only runs with the same fingerprint are compared.
planobject | nullSettings of the latest benchmark; null without one.
Show child attributes
benchmark_idstringrequiredGroups the runs of one Benchmark my job request.
repeatintegerrequired1-based repeat of this run on its GPU.
runs_per_gpuintegerrequiredwork_stepsintegerrequiredSteps (training) or requests (inference) every run performs, sent as GPU_ROUTER_MAX_STEPS or GPU_ROUTER_MAX_REQUESTS.
seedintegerrequiredSent to every run as GPU_ROUTER_SEED.
max_secondsintegerrequiredSandbox timeout of every run.
loss_tolerance_pctstring | nullrequiredAllowed final-loss distance from the median across GPUs, in percent; null disables the check.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cap_usdstringrequiredHard cap of the whole benchmark: rate x GPUs x max_seconds x runs_per_gpu, summed over GPUs.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
resultsobject[]default: []Qualified GPUs by median cost per unit.
Show child attributes
gpuenum<string>requiredAvailable options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
usd_per_gpu_hourstring | nullrequiredThe current rate the figures are priced at, not the rate when the runs were measured.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
runsintegerrequiredQualified runs behind the figures.
unitstringrequired1k steps for training, 1M tokens for inference.
usd_per_unitstringrequiredMedian cost per unit of work: current hourly rate x GPUs / measured throughput.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
usd_per_unit_minstringrequiredpattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
usd_per_unit_maxstringrequiredpattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
throughputstringrequiredMedian steady-state steps/s or tokens/s, or wall-clock work/duration without metric lines.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
startup_secondsstring | nullrequiredMedian process start to first metric line; null without metric lines.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
projected_cost_usdstring | nullrequiredFull job at the current rate: usd_per_unit x the work from work_units, plus startup_seconds x the rate; null without work_units.
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
wall_clock_onlybooleanrequiredTrue when a run printed no usable metric lines: lower confidence.
tied_withenum<string>[]requiredGPUs whose min to max cost per unit overlaps this one's.
Available options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
excludedobject[]default: []Runs that failed, were not verified, or failed the loss check.
Show child attributes
run_idstringrequiredgpuenum<string>requiredAvailable options: T4 L4 A10 L40S A100-40GB A100-80GB RTX-PRO-6000 H100 H200 B200 B300
reasonstringrequiredsummarystringrequiredWhy this GPU, in one sentence.
400application/jsonIDEMPOTENCY_KEY_REQUIRED: the header is missing. CONFIRMATION_REQUIRED: confirm is not true. Nothing is stored.
IDEMPOTENCY_KEY_REQUIREDCONFIRMATION_REQUIRED401application/jsonUNAUTHENTICATED: missing, invalid, expired, or revoked session or API key.
UNAUTHENTICATED403application/jsonCSRF_ORIGIN_MISMATCH: the Origin header does not match the public URL.
CSRF_ORIGIN_MISMATCH404application/jsonROUTE_NOT_FOUND: no route with this id belongs to the signed-in user.
ROUTE_NOT_FOUND409application/jsonBENCHMARK_OVER_CAP: the hard cap of all runs exceeds max_cost_usd. ROUTE_EXPIRED, PROVIDER_CONNECTION_REQUIRED, or RUN_LIMIT_REACHED (the first run on each GPU must fit) as for a run. Nothing is stored.
BENCHMARK_OVER_CAPROUTE_EXPIREDPROVIDER_CONNECTION_REQUIREDRUN_LIMIT_REACHED422application/jsonVALIDATION_ERROR: malformed body, runs_per_gpu outside 1 to 5, or max_seconds above the server's timeout limit. GPU_INCOMPATIBLE: a GPU is not a candidate of the route or has no listed rate.
VALIDATION_ERRORGPU_INCOMPATIBLE429application/jsonRATE_LIMITED (retryable): the signed-in user made more than GPU_ROUTER_RATE_PER_MINUTE mutating requests in the last minute. Nothing was changed.
RATE_LIMITED500application/jsonUnexpected failure: INTERNAL_ERROR.
INTERNAL_ERROR502application/jsonAUTH_PROVIDER_REJECTED: the provider refused the request (not retryable).
AUTH_PROVIDER_REJECTED503application/jsonAUTH_NOT_CONFIGURED (not retryable) or AUTH_PROVIDER_UNAVAILABLE (retryable).
AUTH_NOT_CONFIGUREDAUTH_PROVIDER_UNAVAILABLEMCP tool
start_benchmark: Benchmark a route: launch short probe runs of the job on 2 or 3 of its candidate GPUs in the user's own Modal account, which Modal bills up to the cap. Paid. Call quote_benchmark first, show the user cap_usd, then pass it as max_cost_usd with confirm=true; without confirm nothing launches (CONFIRMATION_REQUIRED), and a cap below the quote is refused (BENCHMARK_OVER_CAP). max_steps is the work every probe performs (training steps or inference requests), seed is sent to every run, loss_tolerance_pct excludes runs whose final loss strays from the median. Reuse idempotency_key to retry without launching twice. Returns the benchmark: probes, results, summary and ranking; get_benchmark follows it.