> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create budget

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

`createBudget(input: CreateBudgetInput!): Budget!`

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`CreateBudgetInput!`](https://veryfront.com/docs/cloud/graphql/types/createbudgetinput) | Yes |

## Input fields

### input

[`CreateBudgetInput`](https://veryfront.com/docs/cloud/graphql/types/createbudgetinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `scope` | [`BudgetScopeInput!`](https://veryfront.com/docs/cloud/graphql/types/budgetscopeinput) | Yes | |
| `monthlyLimitCredits` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) | No | Monthly AI spending limit in credits. Usage already recorded this month counts toward the limit. Supply exactly one of the credit or the deprecated USD limit. |
| `monthlyLimitUsd` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) | No | Monthly limit in USD, converted to credits at the published credit price. Deprecated: Use monthlyLimitCredits. |

## Response

Returns [`Budget!`](https://veryfront.com/docs/cloud/graphql/types/budget). Open the type for its fields and nested types.

| Field | Type |
| - | - |
| `id` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) |
| `scope` | [`BudgetScope!`](https://veryfront.com/docs/cloud/graphql/types/budgetscope) |
| `monthlyLimitCredits` | [`Float!`](https://veryfront.com/docs/cloud/graphql/types/float) |
| `monthlyLimitUsd` | [`Float!`](https://veryfront.com/docs/cloud/graphql/types/float) |
| `status` | [`BudgetStatus!`](https://veryfront.com/docs/cloud/graphql/types/budgetstatus) |
| `createdAt` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) |
| `updatedAt` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation CreateBudget($input: CreateBudgetInput!) {
  createBudget(input: $input) {
    id
    createdAt
    updatedAt
    monthlyLimitCredits
    monthlyLimitUsd
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "scope": {
      "projectReference": "example-project"
    }
  }
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.