# Get your account

> Your balance, this key’s settings, and the limits in force.

Source: https://developers.mnml.ai/docs/account

`GET https://api.mnml.ai/v2/account`

## Example request

**curl**

```bash
curl https://api.mnml.ai/v2/account \
  -H "Authorization: Bearer $MNML_API_KEY"
```

**TypeScript**

```ts
const res = await fetch("https://api.mnml.ai/v2/account", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MNML_API_KEY}`,
  },
});

const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://api.mnml.ai/v2/account",
    headers={"Authorization": f"Bearer {os.environ['MNML_API_KEY']}"},
)

data = res.json()
```

## Example response (200)

```json
{
  "success": true,
  "data": {
    "id": "3f1d2a9e-6c4b-4e8f-b0a7-91c2d5e8f640",
    "email": "studio@example.com",
    "name": "Example Studio",
    "tier": "paid",
    "balance_usd": 97.7427,
    "credits": {
      "spendable": 9873
    },
    "key": {
      "id": "5b8e1c47-0d2a-4f96-8e3b-7a6c9d1f2e04",
      "allowed_origins": [],
      "daily_limit_usd": null,
      "daily_credit_limit": null
    },
    "limits": {
      "scope": "key",
      "requests_per_minute": 60,
      "reads_per_minute": 300,
      "concurrent_jobs": 8,
      "daily_usd": null,
      "daily_credits": null
    }
  }
}
```

`credits.spendable` is your balance: what your API wallet can spend now. Your Studio plan and balance are separate and do not count here. Check it before a large batch so a run does not stop halfway with `402`.

`limits.daily_credits` is what this key may spend per UTC day, the tighter of your tier’s limit and the one you set on the key; `null` means no limit. `limits.scope` says what the limits are counted against: `account` on the free tier, where every key shares them, and `key` once you have topped up your API wallet.

## Amounts in API credits

Every amount is in US dollars, to four decimals: `balance_usd` and the daily limits here, `charged_usd` and `refunded_usd` on a job, the `_usd` prices from [GET /v2/engines](https://developers.mnml.ai/docs/engines), and the `balance_usd` and `threshold_usd` of the `credits.low` webhook. So a v4.6 render, $0.2475, is `0.2475` in those fields. Each also has an older field counting the same amount in API credits, a unit worth $0.0099 (`credits_charged`, `credits.spendable`, …): those are deprecated and will be removed, so read the dollar fields.

## Headers

- `Authorization` (string, required): `Bearer mk_live_…`: your API key. See [Authentication](https://developers.mnml.ai/docs/authentication).

## Response

On success (`200`): The account. The JSON is `{ "success": true, "data": … }`, and inside `data`:

- `id` (string, required): Your mnml account.
- `email` (string, required): The account’s email address.
- `name` (string | null, required): The account’s name; `null` when none is set.
- `tier` (string, required): `paid` once the account has topped up its API wallet; it sets the limits below. Values: `free`, `paid`.
- `balance_usd` (number, required): Your API wallet’s balance: what the next call can spend, in US dollars. Your Studio balance is separate.
- `key` (object, required): The key that made this call.
  - `id` (string, required): The key’s id, as the [console](https://developers.mnml.ai/console/keys) lists it.
  - `allowed_origins` (string[], required): Browser origins that may call with this key. Empty: server-side calls only.
  - `daily_limit_usd` (number | null, required): The daily spend limit you set on this key, in US dollars; `null` for none.
- `limits` (object, required): The limits in force for this key. See [Rate limits](https://developers.mnml.ai/docs/rate-limits).
  - `scope` (string, required): `account` on the free tier, where every key shares the limits; `key` once paid. Values: `account`, `key`.
  - `requests_per_minute` (integer, required): Requests per minute, other than reads.
  - `reads_per_minute` (integer, required): `GET` requests per minute, job polls included, counted apart.
  - `concurrent_jobs` (integer, required): Jobs that may be queued or running at once.
  - `daily_usd` (number | null, required): What this key may spend per UTC day, in US dollars: the tighter of your tier’s limit and the key’s own; `null` for no limit.

**Response headers (4)**

- `X-Request-Id` (string): This request, for support and the console log.
- `RateLimit-Limit` (integer): Requests this key may make per minute.
- `RateLimit-Remaining` (integer): Requests left in the current minute.
- `RateLimit-Reset` (integer): Seconds until the current minute resets.

## Status codes

| Status | Meaning |
| --- | --- |
| 200 | The account. |
| 401 | The API key is missing, malformed, unknown or revoked. |
| 429 | A limit was reached: requests per minute, or a daily or concurrency limit. |
| Other | Any other error, in the same envelope. |

Every error answers `{ "success": false, "error": { "code", "message" } }`. What each code means, and what to do, is on [Errors](https://developers.mnml.ai/docs/errors).
