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
        • Models
        • Workspace
      • OAuth
      • Observability
      • 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 ReferenceModels

Workspace - TypeScript SDK

Workspace type definition
Was this page helpful?
Previous

OAuth - TypeScript SDK

OAuth method reference
Next
Built with

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

Example Usage

1import { Workspace } from "@openrouter/sdk/models";
2
3let value: Workspace = {
4 createdAt: "2025-08-24T10:30:00Z",
5 createdBy: "user_abc123",
6 defaultImageModel: "openai/dall-e-3",
7 defaultProviderSort: "price",
8 defaultTextModel: "openai/gpt-4o",
9 description: "Production environment workspace",
10 id: "550e8400-e29b-41d4-a716-446655440000",
11 ioLoggingApiKeyIds: null,
12 ioLoggingSamplingRate: 1,
13 isDataDiscountLoggingEnabled: true,
14 isObservabilityBroadcastEnabled: false,
15 isObservabilityIoLoggingEnabled: false,
16 name: "Production",
17 slug: "production",
18 updatedAt: "2025-08-24T15:45:00Z",
19};

Fields

FieldTypeRequiredDescriptionExample
createdAtstring✔️ISO 8601 timestamp of when the workspace was created2025-08-24T10:30:00Z
createdBystring✔️User ID of the workspace creatoruser_abc123
defaultImageModelstring✔️Default image model for this workspaceopenai/dall-e-3
defaultProviderSortstring✔️Default provider sort preference (price, throughput, latency, exacto)price
defaultTextModelstring✔️Default text model for this workspaceopenai/gpt-4o
descriptionstring✔️Description of the workspaceProduction environment workspace
idstring✔️Unique identifier for the workspace550e8400-e29b-41d4-a716-446655440000
ioLoggingApiKeyIdsnumber[]✔️Optional array of API key IDs to filter I/O logging. Null means all keys are logged.<nil>
ioLoggingSamplingRatenumber✔️Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.1
isDataDiscountLoggingEnabledboolean✔️Whether data discount logging is enabled for this workspacetrue
isObservabilityBroadcastEnabledboolean✔️Whether broadcast is enabled for this workspacefalse
isObservabilityIoLoggingEnabledboolean✔️Whether private logging is enabled for this workspacefalse
namestring✔️Name of the workspaceProduction
slugstring✔️URL-friendly slug for the workspaceproduction
updatedAtstring✔️ISO 8601 timestamp of when the workspace was last updated2025-08-24T15:45:00Z