API reference

API reference

Routes a GPU job to the cheapest fitting GPU with the evidence, then launches, benchmarks, and verifies it in your own provider account. The same capabilities are reachable three ways: this REST API under /v1 (bearer Authorization: Bearer gr_... from the Developer access page, or the browser session), the gpu-router command line (python -m api.cli, --json on every command), and the MCP server at /mcp (Streamable HTTP, same bearer key). Every error uses one envelope, {error: {code, message, request_id, retryable, details}}; each error response below lists its code values under x-error-codes. Launches and benchmarks take an Idempotency-Key header, so a retry never starts compute twice.

Base URL: https://gpu-router.com. The schema is at /openapi.json, and the interactive Swagger UI at /docs/swagger.

Jobs#

  1. POSTCreate job/v1/jobsAPI key
  2. GETList jobs/v1/jobsAPI key
  3. GETShow job/v1/jobs/{id}API key
  4. GETShow job event/v1/jobs/{id}/eventAPI key

Routes#

  1. POSTCreate route/v1/routesAPI key
  2. GETList routes/v1/routesAPI key
  3. POSTPreview route/v1/routes/previewPublic
  4. GETShow route/v1/routes/{id}API key
  5. GETShow evidence/v1/routes/{id}/evidenceAPI key
  6. GETShow prices/v1/routes/{id}/pricesAPI key

Benchmarks#

  1. GETShow quote/v1/routes/{id}/benchmark/quoteAPI key
  2. GETShow benchmark/v1/routes/{id}/benchmarkAPI key
  3. POSTStart benchmark/v1/routes/{id}/benchmarkAPI key

Runs#

  1. POSTStart run/v1/routes/{id}/runsAPI key
  2. GETList user runs/v1/runsAPI key
  3. GETList user measurements/v1/measurementsAPI key
  4. GETShow run/v1/runs/{id}API key
  5. POSTCancel run/v1/runs/{id}/cancelAPI key
  6. GETShow outputs/v1/runs/{id}/outputsAPI key
  7. GETDownload output/v1/runs/{id}/outputs/{path}API key
  8. GETShow verification/v1/runs/{id}/verificationAPI key

GPUs and prices#

  1. GETList live prices/v1/gpus/livePublic
  2. GETList GPUs/v1/gpusPublic
  3. GETList market index/v1/gpus/market-indexAPI key
  4. GETList latest market index/v1/gpus/market-index/latestAPI key
  5. GETGet GPU history/v1/gpus/{gpu}/historyPublic
  6. GETEstimate token cost/v1/estimates/tokensAPI key
  7. GETShow GPU prices/v1/gpus/{gpu}/pricesAPI key
  8. GETList GPU aggregates/v1/aggregates/gpusPublic
  9. GETList spreads/v1/aggregates/spreadAPI key
  10. GETGet provider spreads/v1/aggregates/spread/{gpu}API key
  11. GETGet daily cheapest/v1/aggregates/daily/{gpu}Public
  12. GETList measurement aggregates/v1/aggregates/measurementsAPI key
  13. GETList quotes/v1/quotesAPI key
  14. POSTCreate quote/v1/quotesAPI key
  15. DELETEDelete quote/v1/quotes/{id}API key
  16. GETList auction prices/v1/auction-pricesAPI key

Samples#

  1. GETList samples/v1/samplesPublic
  2. GETShow sample spec/v1/samples/loraPublic
  3. GETShow sample/v1/samples/{id}Public

Webhooks#

  1. POSTCreate endpoint/v1/webhooksAPI key
  2. GETList endpoints/v1/webhooksAPI key
  3. GETShow endpoint/v1/webhooks/{id}API key
  4. PATCHUpdate endpoint/v1/webhooks/{id}API key
  5. DELETEDelete endpoint/v1/webhooks/{id}API key
  6. POSTSend test event/v1/webhooks/{id}/testAPI key
  7. GETList deliveries/v1/webhooks/{id}/deliveriesAPI key
  8. POSTRetry delivery/v1/webhooks/{id}/deliveries/{delivery_id}/retryAPI key

Connections#

  1. GETList providers/v1/providersAPI key
  2. GETList connections/v1/provider-connectionsAPI key
  3. POSTConnect a provider/v1/provider-connectionsAPI key
  4. GETShow connection/v1/provider-connections/{id}API key
  5. PATCHReplace connection credentials/v1/provider-connections/{id}API key
  6. DELETEDisconnect a provider/v1/provider-connections/{id}API key
  7. POSTRecheck a connection/v1/provider-connections/{id}/verifyAPI key

API keys#

  1. GETList user keys/v1/api-keysSession
  2. POSTCreate key/v1/api-keysSession
  3. DELETEDelete key/v1/api-keys/{id}Session

Account#

  1. GETWho am I/v1/meAPI key

Health#

  1. GETGet health/healthPublic
  2. GETGet ready/readyPublic

Sign-in (browser)#

  1. GETSign up/v1/auth/signupPublic
  2. GETLog in/v1/auth/loginPublic
  3. POSTSend code/v1/auth/emailPublic
  4. POSTCheck code/v1/auth/codePublic
  5. GETLogin with google/v1/auth/login/googlePublic
  6. GETSign-in callback/v1/auth/callbackPublic
  7. POSTLog out/v1/auth/logoutSession
  8. GETSession user/v1/auth/meSession
  9. POSTStart demo/v1/auth/demoPublic

More#

  1. POSTPropose job spec/v1/assist/jobspecAPI key
  2. GETShow report/v1/evals/reportAPI key