TypeScript SDKAPI ReferenceOperations
CreateKeysRequestBody - TypeScript SDK
CreateKeysRequestBody - TypeScript SDK
CreateKeysRequestBody type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Example Usage
1 import { CreateKeysRequestBody } from "@openrouter/sdk/models/operations"; 2 3 let value: CreateKeysRequestBody = { 4 name: "My New API Key", 5 };
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
creatorUserId | string | ➖ | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 |
expiresAt | Date | ➖ | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
includeByokInLimit | boolean | ➖ | Whether to include BYOK usage in the limit | true |
limit | number | ➖ | Optional spending limit for the API key in USD | 50 |
limitReset | operations.CreateKeysLimitReset | ➖ | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
name | string | ✔️ | Name for the new API key | My New API Key |
workspaceId | string | ➖ | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |