createBudget

Create a monthly AI spending limit for a project, a member on a project, an API key, or a combination of these.

Arguments

  • inputCreateBudgetInput!required

  • input.scopeBudgetScopeInput!required

  • input.monthlyLimitCreditsFloat!required

    Monthly AI spending limit in credits. Usage already recorded this month counts toward the limit.

Responses

mutation CreateBudget($input: CreateBudgetInput!) {  createBudget(input: $input) {    id    scope {      kind      projectId      userId      apiKeyId    }    monthlyLimitCredits    monthlyLimitUsd    status {      used      remaining      resetsAt    }    createdAt    updatedAt  }}
{  "data": {    "createBudget": {      "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.createBudget.