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
  • Python SDK
    • Overview
  • Go SDK
      • Analytics
      • APIKeys
      • Byok
      • Chat
      • Credits
      • Embeddings
      • Endpoints
      • Generations
      • Guardrails
      • OAuth
      • Observability
        • CreateKeysRequest
      • Organization
      • Presets
      • Providers
      • Rerank
      • Beta.Responses
      • Transcriptions
      • Speech
      • VideoGeneration
      • Workspaces
  • DevTools
    • Overview
    • Migrating to @openrouter/agent
LogoLogo
ModelsChatRankingsDocs
On this page
  • Fields
Go SDKAPI ReferenceOperations

CreateKeysRequest - Go SDK

CreateKeysRequest type definition
Was this page helpful?
Previous

Organization - Go SDK

Organization method reference
Next
Built with

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

Fields

FieldTypeRequiredDescriptionExample
CreatorUserIDoptionalnullable.OptionalNullable[string]➖Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key.user_2dHFtVWx2n56w6HkM0000000000
ExpiresAtoptionalnullable.OptionalNullable[time.Time]➖Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected2027-12-31T23:59:59Z
IncludeByokInLimit*bool➖Whether to include BYOK usage in the limittrue
Limitoptionalnullable.OptionalNullable[float64]➖Optional spending limit for the API key in USD50
LimitResetoptionalnullable.OptionalNullable[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
Namestring✔️Name for the new API keyMy 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