Create budget

createBudget(input: CreateBudgetInput!): Budget!

Arguments

ArgumentTypeRequired
inputCreateBudgetInput!Yes

Input fields

input

CreateBudgetInput

FieldTypeRequiredDescription
scopeBudgetScopeInput!Yes
monthlyLimitCreditsFloat!YesMonthly AI spending limit in credits. Usage already recorded this month counts toward the limit.

Response

Returns Budget!. Open the type for its fields and nested types.

FieldType
idID!
scopeBudgetScope!
monthlyLimitCreditsFloat!
monthlyLimitUsdFloat!
statusBudgetStatus!
createdAtString!
updatedAtString!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateBudget($input: CreateBudgetInput!) {
  createBudget(input: $input) {
    id
    createdAt
    updatedAt
    monthlyLimitCredits
    monthlyLimitUsd
  }
}
json
{
  "input": {
    "scope": {
      "projectReference": "example-project"
    },
    "monthlyLimitCredits": 100
  }
}