From 6b265656576ef5374b73d51038c204d7c037589e Mon Sep 17 00:00:00 2001 From: OpenRouter SDK Bot Date: Tue, 4 Aug 2026 06:54:12 +0000 Subject: [PATCH] chore: update OpenAPI spec [sdk-bot] --- .speakeasy/in.openapi.yaml | 112 +++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 769bf55d..ce2647e0 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -9555,6 +9555,28 @@ components: required: - 'data' type: 'object' + GetWorkspaceBudgetResponse: + example: + data: + created_at: '2025-08-24T10:30:00Z' + id: '770e8400-e29b-41d4-a716-446655440000' + limit_usd: 100 + reset_interval: 'monthly' + updated_at: '2025-08-24T15:45:00Z' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' + include_byok_in_budgets: true + properties: + data: + allOf: + - $ref: '#/components/schemas/WorkspaceBudget' + - description: 'The budget for the requested interval' + include_byok_in_budgets: + description: 'Whether BYOK (bring-your-own-key) spend is included when enforcing the workspace''s budgets. This is a workspace-wide setting that applies to all budget intervals (daily, weekly, monthly, and lifetime).' + example: true + type: 'boolean' + required: + - 'data' + type: 'object' GetWorkspaceResponse: example: data: @@ -36978,6 +37000,16 @@ paths: schema: $ref: '#/components/schemas/DeleteWorkspaceBudgetResponse' description: 'Budget deleted successfully' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' '401': content: application/json: @@ -37012,6 +37044,86 @@ paths: tags: - 'Workspaces' x-speakeasy-name-override: 'deleteBudget' + get: + description: 'Retrieve the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'getWorkspaceBudget' + parameters: + - description: 'The workspace ID (UUID) or slug' + in: 'path' + name: 'id' + required: true + schema: + description: 'The workspace ID (UUID) or slug' + example: 'production' + minLength: 1 + type: 'string' + - description: 'Budget reset interval. Use "lifetime" for a one-time budget that never resets.' + example: 'monthly' + in: 'path' + name: 'interval' + required: true + schema: + $ref: '#/components/schemas/WorkspaceBudgetInterval' + responses: + '200': + content: + application/json: + example: + data: + created_at: '2025-08-24T10:30:00Z' + id: '770e8400-e29b-41d4-a716-446655440000' + limit_usd: 100 + reset_interval: 'monthly' + updated_at: '2025-08-24T15:45:00Z' + workspace_id: '550e8400-e29b-41d4-a716-446655440000' + include_byok_in_budgets: true + schema: + $ref: '#/components/schemas/GetWorkspaceBudgetResponse' + description: 'Budget retrieved successfully' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + summary: 'Get a workspace budget' + tags: + - 'Workspaces' + x-speakeasy-name-override: 'getBudget' put: description: 'Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optional `include_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](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'upsertWorkspaceBudget'