Workspace - TypeScript SDK

Workspace type definition

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