---
title: upsert-ai-gateway-budget-default
product: vercel
url: /docs/rest-api/sdk/ai-gateway/upsert-ai-gateway-budget-default
canonical_url: "https://vercel.com/docs/rest-api/sdk/ai-gateway/upsert-ai-gateway-budget-default"
last_updated: 2026-10-05
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about upsert-ai-gateway-budget-default on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Upsert AI Gateway budget default

```http
PUT /ai-gateway/budgets/defaults
```

Create or update an AI Gateway budget default for one scope. Team-level authority only (owners/admins).

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Request body

Required: No

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "scopeType",
    "limitAmount"
  ],
  "properties": {
    "scopeType": {
      "type": "string",
      "enum": [
        "team",
        "project",
        "api-key",
        "user"
      ]
    },
    "limitAmount": {
      "type": "number",
      "description": "Default budget limit in dollars.",
      "minimum": 1
    },
    "refreshPeriod": {
      "type": "string",
      "enum": [
        "daily",
        "weekly",
        "monthly",
        "none"
      ]
    },
    "alertThresholds": {
      "type": "array",
      "items": {
        "type": "number",
        "enum": [
          50,
          75,
          100
        ]
      }
    }
  }
}
```

## Example request

```typescript
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.aiGateway.upsertAiGatewayBudgetDefault({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
```

## Example response

```json
{
  "active": "false",
  "alertThresholds": [],
  "createdAt": "123",
  "limitAmount": "123",
  "refreshPeriod": "daily",
  "scopeType": "api-key",
  "updatedAt": "123"
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "active",
    "createdAt",
    "limitAmount",
    "refreshPeriod",
    "scopeType",
    "updatedAt"
  ],
  "properties": {
    "active": {
      "type": "boolean",
      "enum": [
        false,
        true
      ]
    },
    "alertThresholds": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "createdAt": {
      "type": "number"
    },
    "limitAmount": {
      "type": "number"
    },
    "refreshPeriod": {
      "type": "string",
      "enum": [
        "daily",
        "monthly",
        "none",
        "weekly"
      ]
    },
    "scopeType": {
      "type": "string",
      "enum": [
        "api-key",
        "project",
        "team",
        "user"
      ]
    },
    "updatedAt": {
      "type": "number"
    }
  }
}
```

### 400: One of the provided values in the request body is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

### 500: No description

---

## Related

- [ai-gateway endpoints](/docs/rest-api#ai-gateway)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
