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#
- POSTCreate job
/v1/jobsAPI key - GETList jobs
/v1/jobsAPI key - GETShow job
/v1/jobs/{id}API key - GETShow job event
/v1/jobs/{id}/eventAPI key
Routes#
- POSTCreate route
/v1/routesAPI key - GETList routes
/v1/routesAPI key - POSTPreview route
/v1/routes/previewPublic - GETShow route
/v1/routes/{id}API key - GETShow evidence
/v1/routes/{id}/evidenceAPI key - GETShow prices
/v1/routes/{id}/pricesAPI key
Benchmarks#
- GETShow quote
/v1/routes/{id}/benchmark/quoteAPI key - GETShow benchmark
/v1/routes/{id}/benchmarkAPI key - POSTStart benchmark
/v1/routes/{id}/benchmarkAPI key
Runs#
- POSTStart run
/v1/routes/{id}/runsAPI key - GETList user runs
/v1/runsAPI key - GETList user measurements
/v1/measurementsAPI key - GETShow run
/v1/runs/{id}API key - POSTCancel run
/v1/runs/{id}/cancelAPI key - GETShow outputs
/v1/runs/{id}/outputsAPI key - GETDownload output
/v1/runs/{id}/outputs/{path}API key - GETShow verification
/v1/runs/{id}/verificationAPI key
GPUs and prices#
- GETList live prices
/v1/gpus/livePublic - GETList GPUs
/v1/gpusPublic - GETList market index
/v1/gpus/market-indexAPI key - GETList latest market index
/v1/gpus/market-index/latestAPI key - GETGet GPU history
/v1/gpus/{gpu}/historyPublic - GETEstimate token cost
/v1/estimates/tokensAPI key - GETShow GPU prices
/v1/gpus/{gpu}/pricesAPI key - GETList GPU aggregates
/v1/aggregates/gpusPublic - GETList spreads
/v1/aggregates/spreadAPI key - GETGet provider spreads
/v1/aggregates/spread/{gpu}API key - GETGet daily cheapest
/v1/aggregates/daily/{gpu}Public - GETList measurement aggregates
/v1/aggregates/measurementsAPI key - GETList quotes
/v1/quotesAPI key - POSTCreate quote
/v1/quotesAPI key - DELETEDelete quote
/v1/quotes/{id}API key - GETList auction prices
/v1/auction-pricesAPI key
Samples#
- GETList samples
/v1/samplesPublic - GETShow sample spec
/v1/samples/loraPublic - GETShow sample
/v1/samples/{id}Public
Webhooks#
- POSTCreate endpoint
/v1/webhooksAPI key - GETList endpoints
/v1/webhooksAPI key - GETShow endpoint
/v1/webhooks/{id}API key - PATCHUpdate endpoint
/v1/webhooks/{id}API key - DELETEDelete endpoint
/v1/webhooks/{id}API key - POSTSend test event
/v1/webhooks/{id}/testAPI key - GETList deliveries
/v1/webhooks/{id}/deliveriesAPI key - POSTRetry delivery
/v1/webhooks/{id}/deliveries/{delivery_id}/retryAPI key
Connections#
- GETList providers
/v1/providersAPI key - GETList connections
/v1/provider-connectionsAPI key - POSTConnect a provider
/v1/provider-connectionsAPI key - GETShow connection
/v1/provider-connections/{id}API key - PATCHReplace connection credentials
/v1/provider-connections/{id}API key - DELETEDisconnect a provider
/v1/provider-connections/{id}API key - POSTRecheck a connection
/v1/provider-connections/{id}/verifyAPI key
API keys#
- GETList user keys
/v1/api-keysSession - POSTCreate key
/v1/api-keysSession - DELETEDelete key
/v1/api-keys/{id}Session
Account#
Health#
Sign-in (browser)#
- GETSign up
/v1/auth/signupPublic - GETLog in
/v1/auth/loginPublic - POSTSend code
/v1/auth/emailPublic - POSTCheck code
/v1/auth/codePublic - GETLogin with google
/v1/auth/login/googlePublic - GETSign-in callback
/v1/auth/callbackPublic - POSTLog out
/v1/auth/logoutSession - GETSession user
/v1/auth/meSession - POSTStart demo
/v1/auth/demoPublic