# Balance & Limits



`GET /v1/balance` returns your account tier, remaining credit balance and, on the free tier, the daily quota. It costs **0 credits** and is never blocked by a 429 daily-quota error, so free users can always see when their quota resets.

```http
GET /v1/balance
Authorization: Bearer YOUR_API_KEY
```

> `GET /v1/user/balance` is also available as an alias.

Response [#response]

<Tabs items={["Paid Account", "Free Tier"]}>
  <Tab value="Paid Account">
    ```json
    {
      "tier": "paid",
      "credit_balance": 303,
      "daily_quota": null
    }
    ```
  </Tab>

  <Tab value="Free Tier">
    ```json
    {
      "tier": "free",
      "credit_balance": 200,
      "daily_quota": {
        "limit": 100,
        "remaining": 85,
        "resets_in_seconds": 15420
      }
    }
    ```
  </Tab>
</Tabs>

| Field            | Type           | Description                                                                                             |
| :--------------- | :------------- | :------------------------------------------------------------------------------------------------------ |
| `tier`           | string         | `free` or `paid`                                                                                        |
| `credit_balance` | integer        | Credits left on the account                                                                             |
| `daily_quota`    | object or null | Free tier only: `limit`, `remaining` and `resets_in_seconds` for today's quota. `null` on paid accounts |

Examples [#examples]

<Tabs items={["cURL", "Python", "JavaScript / TypeScript"]}>
  <Tab value="cURL">
    ```bash
    curl "https://api.ytapi.dev/v1/balance" \
      -H "Authorization: Bearer $YTAPI_API_KEY"
    ```
  </Tab>

  <Tab value="Python">
    ```python
    # pip install ytapi-sdk
    from ytapi import YTAPI

    api = YTAPI()  # reads YTAPI_API_KEY
    print(api.get_balance())
    ```
  </Tab>

  <Tab value="JavaScript / TypeScript">
    ```ts
    // npm install @ytapi/sdk
    import { YTAPI } from "@ytapi/sdk";

    const api = new YTAPI(); // reads YTAPI_API_KEY
    console.log(await api.getBalance());
    ```
  </Tab>
</Tabs>

Balance on every response [#balance-on-every-response]

Billed responses also carry `X-Credits-Consumed` and, when available, `X-Credits-Remaining`. `X-Credits-Remaining` is an estimate that can lag by a few seconds. Use `GET /v1/balance` when you need the exact figure. See [Credits, Rate Limits & Errors](/credits).
