Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

import { Workspace } from "@openrouter/sdk/models";

let value: Workspace = {
  createdAt: "2025-08-24T10:30:00Z",
  createdBy: "user_abc123",
  defaultImageModel: "openai/dall-e-3",
  defaultProviderSort: "price",
  defaultTextModel: "openai/gpt-4o",
  description: "Production environment workspace",
  id: "550e8400-e29b-41d4-a716-446655440000",
  ioLoggingApiKeyIds: null,
  ioLoggingSamplingRate: 1,
  isDataDiscountLoggingEnabled: true,
  isObservabilityBroadcastEnabled: false,
  isObservabilityIoLoggingEnabled: false,
  name: "Production",
  slug: "production",
  updatedAt: "2025-08-24T15:45:00Z",
};

Fields

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