Example Usage
import { UpdateKeysRequestBody } from "@openrouter/sdk/models/operations";
let value: UpdateKeysRequestBody = {};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
disabled | boolean | ➖ | Whether to disable the API key | false |
includeByokInLimit | boolean | ➖ | Whether external BYOK usage counts toward this key’s limit. When false, only credit usage is checked against limit. | true |
limit | number | ➖ | New spending limit for the API key in USD | 75 |
limitReset | operations.UpdateKeysLimitReset | ➖ | New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | daily |
name | string | ➖ | New name for the API key | Updated API Key Name |
tags | operations.UpdateKeysTagRequest[] | ➖ | Replace the API key’s tags with this set (at most 5). Send an empty array to remove all tags. | [ { “key”: “team”, “value”: “billing” }, { “key”: “beta” } ] |
workspaceId | string | ➖ | Move the API key to this workspace. The key keeps its value; guardrail selections move with it, except direct guardrail assignments owned by the key’s current workspace, which are removed along with the selections derived from them, while other workspace-scoped settings (presets, BYOK keys, broadcast destinations, routing rules) do not. Sending the key’s current workspace is a no-op. | 0df9e665-d932-5740-b2c7-b52af166bc11 |