> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/balance.
>
> - Full docs index: https://docs.meshy.ai/llms.txt
> - Single-fetch full content: https://docs.meshy.ai/llms-full.txt
> - Tool-calling access via MCP server: https://docs.meshy.ai/api/ai

---
# Balance API

Check how many credits you can spend, and how many of them expire at the next monthly refresh.

---

## GET /openapi/v1/balance -- Get the balance

Returns the credit balance of the account that owns the API key. On a team with a shared credit pool, the values are those of the pool. Calling this endpoint is free.

### Returns

  - `balance` · *integer*

  Number of credits you can spend. It's usually `monthly_credits` plus `permanent_credits`.

  It can be lower when a member credit limit or an Enterprise workspace credit limit applies to you. Team owners and admins have no such limit.

  - `monthly_credits` · *integer*

  Number of remaining credits that expire at the next monthly refresh, at `monthly_resets_at`.

  - `permanent_credits` · *integer*

  Number of credits that don't expire, for example from credit packs you bought and from rewards.

  - `monthly_resets_at` · *timestamp*

  Time of the next monthly credit refresh, in Unix milliseconds. At that time, the remaining monthly credits expire, and an active subscription refills them. `null` when no refresh is scheduled.

### Failure modes

  - `401 - Unauthorized`

  The API key is missing or invalid. Check the `Authorization` header.

  - `429 - Too Many Requests`

  You sent too many requests. Wait the number of seconds in `Retry-After`, then retry.

  **cURL**

  ```bash
  curl https://api.meshy.ai/openapi/v1/balance \
  -H "Authorization: Bearer ${YOUR_API_KEY}"
  ```

  ```javascript
  import axios from 'axios';

  const headers = {Authorization: `Bearer ${YOUR_API_KEY}`};

  try {
    const response = await axios.get('https://api.meshy.ai/openapi/v1/balance', {headers});
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
  ```

  ```python
  import requests

  headers = {
    "Authorization": f"Bearer {YOUR_API_KEY}"
  }

  response = requests.get(
    "https://api.meshy.ai/openapi/v1/balance",
    headers=headers,
  )
  response.raise_for_status()
  print(response.json())
  ```

**Response**

```json
{
  "balance": 1000,
  "monthly_credits": 600,
  "permanent_credits": 400,
  "monthly_resets_at": 1793491200000
}
```
