Skip to content

Commit a22a66a

Browse files
openrouter-docs-sync[bot]OpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#603)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent 48ae92a commit a22a66a

1 file changed

Lines changed: 112 additions & 0 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9555,6 +9555,28 @@ components:
95559555
required:
95569556
- 'data'
95579557
type: 'object'
9558+
GetWorkspaceBudgetResponse:
9559+
example:
9560+
data:
9561+
created_at: '2025-08-24T10:30:00Z'
9562+
id: '770e8400-e29b-41d4-a716-446655440000'
9563+
limit_usd: 100
9564+
reset_interval: 'monthly'
9565+
updated_at: '2025-08-24T15:45:00Z'
9566+
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
9567+
include_byok_in_budgets: true
9568+
properties:
9569+
data:
9570+
allOf:
9571+
- $ref: '#/components/schemas/WorkspaceBudget'
9572+
- description: 'The budget for the requested interval'
9573+
include_byok_in_budgets:
9574+
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).'
9575+
example: true
9576+
type: 'boolean'
9577+
required:
9578+
- 'data'
9579+
type: 'object'
95589580
GetWorkspaceResponse:
95599581
example:
95609582
data:
@@ -36978,6 +37000,16 @@ paths:
3697837000
schema:
3697937001
$ref: '#/components/schemas/DeleteWorkspaceBudgetResponse'
3698037002
description: 'Budget deleted successfully'
37003+
'400':
37004+
content:
37005+
application/json:
37006+
example:
37007+
error:
37008+
code: 400
37009+
message: 'Invalid request parameters'
37010+
schema:
37011+
$ref: '#/components/schemas/BadRequestResponse'
37012+
description: 'Bad Request - Invalid request parameters or malformed input'
3698137013
'401':
3698237014
content:
3698337015
application/json:
@@ -37012,6 +37044,86 @@ paths:
3701237044
tags:
3701337045
- 'Workspaces'
3701437046
x-speakeasy-name-override: 'deleteBudget'
37047+
get:
37048+
description: 'Retrieve the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
37049+
operationId: 'getWorkspaceBudget'
37050+
parameters:
37051+
- description: 'The workspace ID (UUID) or slug'
37052+
in: 'path'
37053+
name: 'id'
37054+
required: true
37055+
schema:
37056+
description: 'The workspace ID (UUID) or slug'
37057+
example: 'production'
37058+
minLength: 1
37059+
type: 'string'
37060+
- description: 'Budget reset interval. Use "lifetime" for a one-time budget that never resets.'
37061+
example: 'monthly'
37062+
in: 'path'
37063+
name: 'interval'
37064+
required: true
37065+
schema:
37066+
$ref: '#/components/schemas/WorkspaceBudgetInterval'
37067+
responses:
37068+
'200':
37069+
content:
37070+
application/json:
37071+
example:
37072+
data:
37073+
created_at: '2025-08-24T10:30:00Z'
37074+
id: '770e8400-e29b-41d4-a716-446655440000'
37075+
limit_usd: 100
37076+
reset_interval: 'monthly'
37077+
updated_at: '2025-08-24T15:45:00Z'
37078+
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
37079+
include_byok_in_budgets: true
37080+
schema:
37081+
$ref: '#/components/schemas/GetWorkspaceBudgetResponse'
37082+
description: 'Budget retrieved successfully'
37083+
'400':
37084+
content:
37085+
application/json:
37086+
example:
37087+
error:
37088+
code: 400
37089+
message: 'Invalid request parameters'
37090+
schema:
37091+
$ref: '#/components/schemas/BadRequestResponse'
37092+
description: 'Bad Request - Invalid request parameters or malformed input'
37093+
'401':
37094+
content:
37095+
application/json:
37096+
example:
37097+
error:
37098+
code: 401
37099+
message: 'Missing Authentication header'
37100+
schema:
37101+
$ref: '#/components/schemas/UnauthorizedResponse'
37102+
description: 'Unauthorized - Authentication required or invalid credentials'
37103+
'404':
37104+
content:
37105+
application/json:
37106+
example:
37107+
error:
37108+
code: 404
37109+
message: 'Resource not found'
37110+
schema:
37111+
$ref: '#/components/schemas/NotFoundResponse'
37112+
description: 'Not Found - Resource does not exist'
37113+
'500':
37114+
content:
37115+
application/json:
37116+
example:
37117+
error:
37118+
code: 500
37119+
message: 'Internal Server Error'
37120+
schema:
37121+
$ref: '#/components/schemas/InternalServerResponse'
37122+
description: 'Internal Server Error - Unexpected server error'
37123+
summary: 'Get a workspace budget'
37124+
tags:
37125+
- 'Workspaces'
37126+
x-speakeasy-name-override: 'getBudget'
3701537127
put:
3701637128
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.'
3701737129
operationId: 'upsertWorkspaceBudget'

0 commit comments

Comments
 (0)