Change the monthly limit of a budget, keeping its scope and this month’s usage.
Arguments
budgetIdID!requiredBudget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404).
inputUpdateBudgetInput!requiredinput.monthlyLimitCreditsFloat!requiredNew monthly AI spending limit in credits. Usage already recorded this month is retained; if the new limit is below it, the next call in the scope is rejected.
Responses
mutation UpdateBudget($budgetId: ID!, $input: UpdateBudgetInput!) { updateBudget(budgetId: $budgetId, input: $input) { id scope { kind projectId userId apiKeyId } monthlyLimitCredits monthlyLimitUsd status { used remaining resetsAt } createdAt updatedAt }}{ "data": { "updateBudget": { "id": "string", "scope": { "kind": "string", "projectId": "string", "userId": "string", "apiKeyId": "string" }, "monthlyLimitCredits": 0, "monthlyLimitUsd": 0, "status": { "used": 0, "remaining": 0, "resetsAt": "string" }, "createdAt": "string", "updatedAt": "string" } }}The Budget! in data.updateBudget.