For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
    • Overview
    • Usage for Agents
  • TypeScript SDK
    • Overview
      • Analytics
      • APIKeys
      • Byok
      • Chat
      • Credits
      • Embeddings
      • Endpoints
      • Generations
      • Guardrails
      • OAuth
      • Observability
        • CreateKeysResponse
      • Organization
      • Presets
      • Providers
      • Rerank
      • Beta.Responses
      • Transcriptions
      • Speech
      • VideoGeneration
      • Workspaces
  • Python SDK
    • Overview
  • Go SDK
  • DevTools
    • Overview
    • Migrating to @openrouter/agent
LogoLogo
ModelsChatRankingsDocs
On this page
  • Example Usage
  • Fields
TypeScript SDKAPI ReferenceOperations

CreateKeysResponse - TypeScript SDK

CreateKeysResponse type definition
Was this page helpful?
Previous

Organization - TypeScript SDK

Organization method reference
Next
Built with

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

API key created successfully

Example Usage

1import { CreateKeysResponse } from "@openrouter/sdk/models/operations";
2
3let value: CreateKeysResponse = {
4 data: {
5 byokUsage: 0,
6 byokUsageDaily: 0,
7 byokUsageMonthly: 0,
8 byokUsageWeekly: 0,
9 createdAt: "2025-08-24T10:30:00Z",
10 creatorUserId: "user_2dHFtVWx2n56w6HkM0000000000",
11 disabled: false,
12 hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
13 includeByokInLimit: true,
14 label: "My New API Key",
15 limit: 50,
16 limitRemaining: 50,
17 limitReset: "monthly",
18 name: "My New API Key",
19 updatedAt: null,
20 usage: 0,
21 usageDaily: 0,
22 usageMonthly: 0,
23 usageWeekly: 0,
24 workspaceId: "0df9e665-d932-5740-b2c7-b52af166bc11",
25 },
26 key:
27 "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",
28};

Fields

FieldTypeRequiredDescriptionExample
dataoperations.CreateKeysData✔️The created API key information{"byok_usage": 17.38,"byok_usage_daily": 17.38,"byok_usage_monthly": 17.38,"byok_usage_weekly": 17.38,"created_at": "2025-08-24T10:30:00Z","creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000","disabled": false,"expires_at": "2027-12-31T23:59:59Z","hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943","include_byok_in_limit": false,"label": "sk-or-v1-0e6...1c96","limit": 100,"limit_remaining": 74.5,"limit_reset": "monthly","name": "My Production Key","updated_at": "2025-08-24T15:45:00Z","usage": 25.5,"usage_daily": 25.5,"usage_monthly": 25.5,"usage_weekly": 25.5,"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"}
keystring✔️The actual API key string (only shown once)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