# Ask for a temporary increase

Source: https://immiscible.fly.dev/docs/api/post-api-w-wid-agents-aid-budget-increase

`POST /api/w/:wid/agents/:aid/budget-increase`

Ask to raise the agent's AI budget for the rest of this month. It becomes a proposal that another owner confirms; whoever asked cannot confirm it. Confirmed, it raises this month's budget only, and next month starts from the budget as it was set. Only whoever manages the agent, or the person it acts for, may ask. `409` when the agent has no budget this month, or an increase is already waiting.

| Field | Description |
|---|---|
| `amountUsd` | the extra amount, in dollars |
| `reason` | optional, up to 500 characters |

## Authentication

Session cookie. A signed-in person: the console's session cookie. Every state-changing request also carries the header `x-immiscible-csrf: 1`, and the member's role decides what it may do. Bearer tokens are ignored on these routes, so no machine credential can reach them.

## Path parameters

- `wid` (string, required): Workspace id
- `aid` (string, required): Agent id

## Request

curl:

```bash
curl -X POST "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/agents/agt_4f2c91a7/budget-increase" \
  -H "cookie: __Host-sid=$IMMISCIBLE_SESSION" \
  -H "x-immiscible-csrf: 1" \
  -H "content-type: application/json" \
  -d '{
    "amountUsd": 100,
    "reason": "Month-end close"
  }'
```

Node:

```ts
const res = await fetch('https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/agents/agt_4f2c91a7/budget-increase', {
  method: 'POST',
  headers: {
    cookie: `__Host-sid=${process.env.IMMISCIBLE_SESSION}`,
    'x-immiscible-csrf': '1',
    'content-type': 'application/json',
  },
  body: JSON.stringify({
    amountUsd: 100,
    reason: 'Month-end close',
  }),
});
const data = await res.json();
console.log(res.status, data);
```

Python:

```python
import os
import requests

res = requests.post(
    "https://immiscible.fly.dev/api/w/$IMMISCIBLE_WORKSPACE/agents/agt_4f2c91a7/budget-increase",
    headers={
        "cookie": f"__Host-sid={os.environ['IMMISCIBLE_SESSION']}",
        "x-immiscible-csrf": "1",
        "content-type": "application/json",
    },
    json={
        "amountUsd": 100,
        "reason": "Month-end close",
    },
)
print(res.status_code, res.json())
```
