@@ -7303,6 +7303,18 @@ components:
73037303 required:
73047304 - deleted
73057305 type: object
7306+ DeleteWorkspaceBudgetResponse:
7307+ example:
7308+ deleted: true
7309+ properties:
7310+ deleted:
7311+ const: true
7312+ description: Confirmation that the budget was deleted (or did not exist)
7313+ example: true
7314+ type: boolean
7315+ required:
7316+ - deleted
7317+ type: object
73067318 DeleteWorkspaceResponse:
73077319 example:
73087320 deleted: true
@@ -10372,6 +10384,24 @@ components:
1037210384 - data
1037310385 - total_count
1037410386 type: object
10387+ ListWorkspaceBudgetsResponse:
10388+ example:
10389+ data:
10390+ - created_at: '2025-08-24T10:30:00Z'
10391+ id: 770e8400-e29b-41d4-a716-446655440000
10392+ limit_usd: 100
10393+ reset_interval: monthly
10394+ updated_at: '2025-08-24T15:45:00Z'
10395+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
10396+ properties:
10397+ data:
10398+ description: List of budgets configured for the workspace
10399+ items:
10400+ $ref: '#/components/schemas/WorkspaceBudget'
10401+ type: array
10402+ required:
10403+ - data
10404+ type: object
1037510405 ListWorkspacesResponse:
1037610406 example:
1037710407 data:
@@ -20903,6 +20933,35 @@ components:
2090320933 required:
2090420934 - data
2090520935 type: object
20936+ UpsertWorkspaceBudgetRequest:
20937+ example:
20938+ limit_usd: 100
20939+ properties:
20940+ limit_usd:
20941+ description: Spending limit in USD. Must be greater than 0.
20942+ example: 100
20943+ format: double
20944+ type: number
20945+ required:
20946+ - limit_usd
20947+ type: object
20948+ UpsertWorkspaceBudgetResponse:
20949+ example:
20950+ data:
20951+ created_at: '2025-08-24T10:30:00Z'
20952+ id: 770e8400-e29b-41d4-a716-446655440000
20953+ limit_usd: 100
20954+ reset_interval: monthly
20955+ updated_at: '2025-08-24T15:45:00Z'
20956+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
20957+ properties:
20958+ data:
20959+ allOf:
20960+ - $ref: '#/components/schemas/WorkspaceBudget'
20961+ - description: The created or updated budget
20962+ required:
20963+ - data
20964+ type: object
2090620965 URLCitation:
2090720966 example:
2090820967 content: OpenRouter provides a unified API for accessing LLMs from multiple providers.
@@ -21882,6 +21941,65 @@ components:
2188221941 - updated_at
2188321942 - created_by
2188421943 type: object
21944+ WorkspaceBudget:
21945+ example:
21946+ created_at: '2025-08-24T10:30:00Z'
21947+ id: 770e8400-e29b-41d4-a716-446655440000
21948+ limit_usd: 100
21949+ reset_interval: monthly
21950+ updated_at: '2025-08-24T15:45:00Z'
21951+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
21952+ properties:
21953+ created_at:
21954+ description: ISO 8601 timestamp of when the budget was created
21955+ example: '2025-08-24T10:30:00Z'
21956+ type: string
21957+ id:
21958+ description: Unique identifier for the budget
21959+ example: 770e8400-e29b-41d4-a716-446655440000
21960+ format: uuid
21961+ type: string
21962+ limit_usd:
21963+ description: Spending limit in USD for this interval
21964+ example: 100
21965+ format: double
21966+ type: number
21967+ reset_interval:
21968+ description: Interval at which spend resets. Null means a lifetime (one-time) budget.
21969+ enum:
21970+ - daily
21971+ - weekly
21972+ - monthly
21973+ - null
21974+ example: monthly
21975+ nullable: true
21976+ type: string
21977+ updated_at:
21978+ description: ISO 8601 timestamp of when the budget was last updated
21979+ example: '2025-08-24T15:45:00Z'
21980+ type: string
21981+ workspace_id:
21982+ description: ID of the workspace the budget belongs to
21983+ example: 550e8400-e29b-41d4-a716-446655440000
21984+ format: uuid
21985+ type: string
21986+ required:
21987+ - id
21988+ - workspace_id
21989+ - limit_usd
21990+ - reset_interval
21991+ - created_at
21992+ - updated_at
21993+ type: object
21994+ WorkspaceBudgetInterval:
21995+ description: Budget reset interval. Use "lifetime" for a one-time budget that never resets.
21996+ enum:
21997+ - daily
21998+ - weekly
21999+ - monthly
22000+ - lifetime
22001+ example: monthly
22002+ type: string
2188522003 WorkspaceMember:
2188622004 example:
2188722005 created_at: '2025-08-24T10:30:00Z'
@@ -32185,6 +32303,227 @@ paths:
3218532303 tags:
3218632304 - Workspaces
3218732305 x-speakeasy-name-override: update
32306+ /workspaces/{id}/budgets:
32307+ get:
32308+ description: >-
32309+ List all budgets configured for a workspace. [Management key](/docs/guides/overview/auth/management-api-keys)
32310+ required.
32311+ operationId: listWorkspaceBudgets
32312+ parameters:
32313+ - description: The workspace ID (UUID) or slug
32314+ in: path
32315+ name: id
32316+ required: true
32317+ schema:
32318+ description: The workspace ID (UUID) or slug
32319+ example: production
32320+ minLength: 1
32321+ type: string
32322+ responses:
32323+ '200':
32324+ content:
32325+ application/json:
32326+ example:
32327+ data:
32328+ - created_at: '2025-08-24T10:30:00Z'
32329+ id: 770e8400-e29b-41d4-a716-446655440000
32330+ limit_usd: 100
32331+ reset_interval: monthly
32332+ updated_at: '2025-08-24T15:45:00Z'
32333+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
32334+ schema:
32335+ $ref: '#/components/schemas/ListWorkspaceBudgetsResponse'
32336+ description: Budgets retrieved successfully
32337+ '401':
32338+ content:
32339+ application/json:
32340+ example:
32341+ error:
32342+ code: 401
32343+ message: Missing Authentication header
32344+ schema:
32345+ $ref: '#/components/schemas/UnauthorizedResponse'
32346+ description: Unauthorized - Authentication required or invalid credentials
32347+ '404':
32348+ content:
32349+ application/json:
32350+ example:
32351+ error:
32352+ code: 404
32353+ message: Resource not found
32354+ schema:
32355+ $ref: '#/components/schemas/NotFoundResponse'
32356+ description: Not Found - Resource does not exist
32357+ '500':
32358+ content:
32359+ application/json:
32360+ example:
32361+ error:
32362+ code: 500
32363+ message: Internal Server Error
32364+ schema:
32365+ $ref: '#/components/schemas/InternalServerResponse'
32366+ description: Internal Server Error - Unexpected server error
32367+ summary: List workspace budgets
32368+ tags:
32369+ - Workspaces
32370+ x-speakeasy-name-override: listBudgets
32371+ /workspaces/{id}/budgets/{interval}:
32372+ delete:
32373+ description: >-
32374+ Remove the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys)
32375+ required.
32376+ operationId: deleteWorkspaceBudget
32377+ parameters:
32378+ - description: The workspace ID (UUID) or slug
32379+ in: path
32380+ name: id
32381+ required: true
32382+ schema:
32383+ description: The workspace ID (UUID) or slug
32384+ example: production
32385+ minLength: 1
32386+ type: string
32387+ - description: Budget reset interval. Use "lifetime" for a one-time budget that never resets.
32388+ example: monthly
32389+ in: path
32390+ name: interval
32391+ required: true
32392+ schema:
32393+ $ref: '#/components/schemas/WorkspaceBudgetInterval'
32394+ responses:
32395+ '200':
32396+ content:
32397+ application/json:
32398+ example:
32399+ deleted: true
32400+ schema:
32401+ $ref: '#/components/schemas/DeleteWorkspaceBudgetResponse'
32402+ description: Budget deleted successfully
32403+ '401':
32404+ content:
32405+ application/json:
32406+ example:
32407+ error:
32408+ code: 401
32409+ message: Missing Authentication header
32410+ schema:
32411+ $ref: '#/components/schemas/UnauthorizedResponse'
32412+ description: Unauthorized - Authentication required or invalid credentials
32413+ '404':
32414+ content:
32415+ application/json:
32416+ example:
32417+ error:
32418+ code: 404
32419+ message: Resource not found
32420+ schema:
32421+ $ref: '#/components/schemas/NotFoundResponse'
32422+ description: Not Found - Resource does not exist
32423+ '500':
32424+ content:
32425+ application/json:
32426+ example:
32427+ error:
32428+ code: 500
32429+ message: Internal Server Error
32430+ schema:
32431+ $ref: '#/components/schemas/InternalServerResponse'
32432+ description: Internal Server Error - Unexpected server error
32433+ summary: Delete a workspace budget
32434+ tags:
32435+ - Workspaces
32436+ x-speakeasy-name-override: deleteBudget
32437+ put:
32438+ description: >-
32439+ Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows
32440+ (lifetime > monthly > weekly > daily). [Management key](/docs/guides/overview/auth/management-api-keys)
32441+ required.
32442+ operationId: upsertWorkspaceBudget
32443+ parameters:
32444+ - description: The workspace ID (UUID) or slug
32445+ in: path
32446+ name: id
32447+ required: true
32448+ schema:
32449+ description: The workspace ID (UUID) or slug
32450+ example: production
32451+ minLength: 1
32452+ type: string
32453+ - description: Budget reset interval. Use "lifetime" for a one-time budget that never resets.
32454+ example: monthly
32455+ in: path
32456+ name: interval
32457+ required: true
32458+ schema:
32459+ $ref: '#/components/schemas/WorkspaceBudgetInterval'
32460+ requestBody:
32461+ content:
32462+ application/json:
32463+ example:
32464+ limit_usd: 100
32465+ schema:
32466+ $ref: '#/components/schemas/UpsertWorkspaceBudgetRequest'
32467+ required: true
32468+ responses:
32469+ '200':
32470+ content:
32471+ application/json:
32472+ example:
32473+ data:
32474+ created_at: '2025-08-24T10:30:00Z'
32475+ id: 770e8400-e29b-41d4-a716-446655440000
32476+ limit_usd: 100
32477+ reset_interval: monthly
32478+ updated_at: '2025-08-24T15:45:00Z'
32479+ workspace_id: 550e8400-e29b-41d4-a716-446655440000
32480+ schema:
32481+ $ref: '#/components/schemas/UpsertWorkspaceBudgetResponse'
32482+ description: Budget created or updated successfully
32483+ '400':
32484+ content:
32485+ application/json:
32486+ example:
32487+ error:
32488+ code: 400
32489+ message: Invalid request parameters
32490+ schema:
32491+ $ref: '#/components/schemas/BadRequestResponse'
32492+ description: Bad Request - Invalid request parameters or malformed input
32493+ '401':
32494+ content:
32495+ application/json:
32496+ example:
32497+ error:
32498+ code: 401
32499+ message: Missing Authentication header
32500+ schema:
32501+ $ref: '#/components/schemas/UnauthorizedResponse'
32502+ description: Unauthorized - Authentication required or invalid credentials
32503+ '404':
32504+ content:
32505+ application/json:
32506+ example:
32507+ error:
32508+ code: 404
32509+ message: Resource not found
32510+ schema:
32511+ $ref: '#/components/schemas/NotFoundResponse'
32512+ description: Not Found - Resource does not exist
32513+ '500':
32514+ content:
32515+ application/json:
32516+ example:
32517+ error:
32518+ code: 500
32519+ message: Internal Server Error
32520+ schema:
32521+ $ref: '#/components/schemas/InternalServerResponse'
32522+ description: Internal Server Error - Unexpected server error
32523+ summary: Create or update a workspace budget
32524+ tags:
32525+ - Workspaces
32526+ x-speakeasy-name-override: setBudget
3218832527 /workspaces/{id}/members/add:
3218932528 post:
3219032529 description: >-
0 commit comments