CreateAuthKeysCodeRequestBody - TypeScript SDK

CreateAuthKeysCodeRequestBody type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

1import { CreateAuthKeysCodeRequestBody } from "@openrouter/sdk/models/operations";
2
3let value: CreateAuthKeysCodeRequestBody = {
4 callbackUrl: "https://myapp.com/auth/callback",
5};

Fields

FieldTypeRequiredDescriptionExample
callbackUrlstring✔️The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.https://myapp.com/auth/callback
codeChallengestringPKCE code challenge for enhanced securityE9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
codeChallengeMethodoperations.CreateAuthKeysCodeCodeChallengeMethodThe method used to generate the code challengeS256
limitnumberCredit limit for the API key to be created100
expiresAtDateOptional expiration time for the API key to be created2027-12-31T23:59:59Z
keyLabelstringOptional custom label for the API key. Defaults to the app name if not provided.My Custom Key
usageLimitTypeoperations.UsageLimitTypeOptional credit limit reset interval. When set, the credit limit resets on this interval.monthly