Overview
Workspaces endpointsAvailable Operations
- list - List workspaces
- create - Create a workspace
- delete - Delete a workspace
- get - Get a workspace
- update - Update a workspace
- listBudgets - List workspace budgets
- deleteBudget - Delete a workspace budget
- getBudget - Get a workspace budget
- setBudget - Create or update a workspace budget
- listMembers - List workspace members
- bulkAddMembers - Bulk add members to a workspace
- bulkRemoveMembers - Bulk remove members from a workspace
list
List all workspaces for the authenticated user. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<operations.ListWorkspacesResponse>Errors
create
Create a new workspace for the authenticated user. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.CreateWorkspaceResponse>Errors
delete
Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requiresconfirm_default_settings_deletion=true and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. Management key required.
Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.DeleteWorkspaceResponse>Errors
get
Get a single workspace by ID or slug. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.GetWorkspaceResponse>Errors
update
Update an existing workspace by ID or slug. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.UpdateWorkspaceResponse>Errors
listBudgets
List all budgets configured for a workspace. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.ListWorkspaceBudgetsResponse>Errors
deleteBudget
Remove the budget for a given interval. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.DeleteWorkspaceBudgetResponse>Errors
getBudget
Retrieve the budget for a given interval. Management key required.Example Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<models.GetWorkspaceBudgetResponse>Errors
setBudget
Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optionalinclude_byok_in_budgets flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. Management key required.