GRGlobalRouter Docs
Console

API Key / POST

Create API key

Creates a new tenant API key.

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.
POST/api/v1/keys

Requires management scope. The plaintext key is returned only once on successful creation; store it securely.

Back to API Key endpoint list

Request parameters

FieldTypeRequiredDescription
namestringNoSee the OpenAPI schema for field details.
scopesstring[]NoSee the OpenAPI schema for field details.
expires_atstringNoFormat: date-time.

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.