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

Example Usage

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

let value: ListWorkspacesResponse = {
  data: [
    {
      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",
    },
  ],
  totalCount: 1,
};

Fields

FieldTypeRequiredDescriptionExample
datamodels.Workspace[]:heavy_check_mark:List of workspaces
totalCountnumber:heavy_check_mark:Total number of workspaces5