GRGlobalRouter Docs
Console

API Key / PATCH

Update API key

Updates an API key's name, scopes, model ranges, source IPs, or rate limit.

endpoint list

Mobile view shows the endpoint list. Use desktop view for parameters and examples.

MethodEndpointDescription
GET/api/v1/keyRead masked information about the current API key.
GET/api/v1/keysLists API keys visible to the current tenant.
POST/api/v1/keysCreates a new tenant API key.
GET/api/v1/keys/{key_ref}Read a single API key by reference.
PATCH/api/v1/keys/{key_ref}Updates an API key's name, scopes, model ranges, source IPs, or rate limit.
DELETE/api/v1/keys/{key_ref}Revokes an API key.
PATCH/api/v1/keys/{key_ref}

Only fields present in the request body are updated. Requires management scope.

Back to API Key endpoint list

Request parameters

FieldTypeRequiredDescription
path.key_refstringYespath parameters。
namestringNoSee the OpenAPI schema for field details.
disabledbooleanNoSee the OpenAPI schema for field details.
scopesstring[]NoSee the OpenAPI schema for field details.

Response fields

FieldTypeRequiredDescription
dataobjectNoSee the OpenAPI schema for field details.

Errors

401UNAUTHORIZED

Missing or invalid Authorization Bearer token.

403FORBIDDEN

The current API key is not authorized for this scope, model, or management capability.

422VALIDATION_ERROR

The request body, path parameters, or query parameters do not match the endpoint schema.

Notes

  • Use a GlobalRouter API key; upstream OpenRouter API keys are never exposed to tenants.