# How to stop one user from running up your AI bill

URL: https://bridge.wekoya.tech/guides/control-ai-costs-per-user
Updated: 2026-11-08

**In short:** Give every user of your app their own budget and every key its own limit. On Bridge by Wekoya you send the `X-Bridge-End-User` header with each request, and Bridge meters that user and stops them at their budget with a 402, while everyone else carries on.

## Three limits, from widest to narrowest

- A naira limit on each API key, checked before every request.
- A budget for each of your users: name the user on each request with `X-Bridge-End-User`, and Bridge tracks and limits them separately. See [your users' budgets](https://bridge.wekoya.tech/docs/end-users).
- Short-lived guest keys for browsers and phones, made by your server, that expire and stop at `max_spend`. See [browser and mobile apps](https://bridge.wekoya.tech/docs/guest-keys).

## Name the user on each request

```python
reply = client.chat.completions.create(
    model="gpt-6-luna",
    messages=[{"role": "user", "content": question}],
    extra_headers={"X-Bridge-End-User": user.id},
)
```

Create each user first, or turn on auto-create in the console. When a user's budget is spent, their requests get a 402 `end_user_budget_exhausted`; show them a friendly message instead of an error.

[Create a free account](https://bridge.wekoya.tech/sign-up)

## Common questions

**What happens when a user runs out of budget?**

Their requests are refused with 402 end_user_budget_exhausted, and nothing is charged for the refused request. Other users are not affected.

**Can I call Bridge straight from a mobile app?**

Not with your API key, which must stay on your server. Your server makes a short-lived guest key for the signed-in user, limited in spend and uses, and the app uses that.

## Read next

- [Add AI to your app in Nigeria](https://bridge.wekoya.tech/guides/add-ai-to-your-app-nigeria)
