Webhooks

Create endpoint

Register an endpoint for job, run, benchmark, and budget events, signed with the returned secret.

POST/v1/webhooksAPI key

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 | null

Required and non-empty; missing or empty answers 400 IDEMPOTENCY_KEY_REQUIRED

Body

urlstring<uri>required

Where events are POSTed: https, or http to localhost on a local server.

minLength: 1

maxLength: 2083

eventsenum<string>[]default: ["job.completed", "job.failed", "run.completed", "run.failed", "benchmark.completed", "budget.reached"]

Event types to send; all by default.

Available options: job.completed job.failed run.completed run.failed benchmark.completed budget.reached webhook.test

minItems: 1

formatenum<string>default: "json"

json: the signed event; slack or discord: a chat message.

Available options: json slack discord

Responses

201application/json

The endpoint. secret is shown in this response only (and to a retry with the same Idempotency-Key).

Show response attributes
idstringrequired
urlstringrequired
eventsenum<string>[]required

Available options: job.completed job.failed run.completed run.failed benchmark.completed budget.reached webhook.test

formatenum<string>required

Available options: json slack discord

enabledbooleanrequired
disabled_reasonstring | null

Why sending stopped on its own (a 410 Gone answer); cleared when enabled again.

created_atstring<date-time>required
secretstringrequired

HMAC-SHA256 signing secret, shown once. See README Webhooks for verification.

400application/json

IDEMPOTENCY_KEY_REQUIRED: the Idempotency-Key header is missing or empty.

IDEMPOTENCY_KEY_REQUIRED
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
409application/json

WEBHOOK_LIMIT_REACHED: the caller already has 5 endpoints. Nothing is stored.

WEBHOOK_LIMIT_REACHED
422application/json

VALIDATION_ERROR: malformed body, url not https to a public host (a hosted server refuses localhost and hosts that are or resolve to private, loopback, or link-local addresses, or do not resolve; plain http only to localhost on a local server), or events empty or naming an unknown event. Nothing is stored.

VALIDATION_ERROR
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

create_webhook: Register a webhook endpoint for job, run, benchmark and budget events. events defaults to all of job.completed, job.failed, run.completed, run.failed, benchmark.completed, budget.reached; format json sends the signed event, slack or discord a chat message. Returns the endpoint with its HMAC-SHA256 secret, shown once. Reuse idempotency_key to retry without a second endpoint. Free.