> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sigrunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user account balance

> 返回当前 API Key 所属用户的积分余额。

Returns the **points balance** for the account that owns the current API key. OpenAPI charges debit this balance. Call this before creating jobs if you want to confirm funds.

For push alerts when balance is low, see [Balance alert webhook](/en/api-reference/common/balance-webhook).

### Response fields

| Field | Type | Description |
| :- | :- | :- |
| `balance` | number | Cumulative account value (available + historical net spend) |
| `used_coin` | number | Historical net spend (see below) |
| `available` | number | Spendable balance = `balance` - `used_coin` |

### About `used_coin`

`used_coin` is **account-level** historical net spend in points.

* **Formula**: sum of all `consumption` rows minus all `refund` rows.
* **Scope**: every API key under the user, not only the key used for this request.
* **Vs key `used_quota`**: [`/key/balance`](/en/api-reference/common/key-balance) `used_quota` is per-key; `used_coin` is whole-account spend.

### Example

```bash theme={null}
curl -X GET 'https://sigrunai.com/v1/user/balance' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

```json theme={null}
{
  "code": 20000,
  "msg": "ok",
  "data": {
    "balance": 100.5,
    "used_coin": 20.3,
    "available": 80.2
  }
}
```


## OpenAPI

````yaml GET /v1/user/balance
openapi: 3.1.0
info:
  title: AI Platform OpenAPI
  description: 异步图片与视频生成。创建后轮询 task_id；结果 URL 约保留 3 天。
  version: 1.0.0
servers:
  - url: https://sigrunai.com
    description: AI Platform 生产环境
security:
  - bearerAuth: []
paths:
  /v1/user/balance:
    get:
      tags:
        - Account
      summary: Get user account balance
      description: Returns points balance for the account that owns the current API key.
      operationId: getUserBalance
      responses:
        '200':
          description: Balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBalanceResponse'
components:
  schemas:
    UserBalanceResponse:
      type: object
      properties:
        code:
          type: integer
          example: 20000
        msg:
          type: string
        data:
          type: object
          properties:
            balance:
              type: number
            used_coin:
              type: number
            available:
              type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 控制台创建的 API Key，格式：Bearer sk_xxx

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.