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

# Query Account Balance

> Returns the account balance overview.

Note: for monthly-subscription users the balance may be `0` — their available quota is reflected in the package endpoint instead.




## OpenAPI

````yaml api-reference/finance-1.0.0.openapi.yaml GET /user/finance/balance
openapi: 3.0.3
info:
  title: TextIn Finance API
  description: |
    Query account balance and service package quota.
  version: 1.0.0
  contact:
    name: TextIn API Team
servers:
  - url: https://api.textin.ai
    description: Production Environment
security:
  - AppIdAuth: []
    SecretCodeAuth: []
tags:
  - name: Finance
    description: >
      Query account balance and service package quota.


      ## Authentication

      Pass `x-ti-app-id` and `x-ti-secret-code` in the request headers (your
      account's App ID / Secret Code). A missing credential returns `40101`.


      ## Response Format

      JSON. `code=200` with `msg=success` indicates success. Each response
      carries an `x_request_id` header for troubleshooting.
paths:
  /user/finance/balance:
    get:
      tags:
        - Finance
      summary: Query Account Balance
      description: >
        Returns the account balance overview.


        Note: for monthly-subscription users the balance may be `0` — their
        available quota is reflected in the package endpoint instead.
      operationId: financeBalance
      responses:
        '200':
          description: Balance information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
              examples:
                success:
                  summary: Success Example
                  value:
                    code: 200
                    msg: success
                    data:
                      balance: 999.1
                      available_balance: 999.1
                      unavailable_balance: 0
components:
  schemas:
    BalanceResponse:
      type: object
      required:
        - code
        - msg
      properties:
        code:
          type: integer
          description: >
            Status code

            - 200: Success

            - 40101: x-ti-app-id or x-ti-secret-code is empty

            - 40102: x-ti-app-id or x-ti-secret-code is invalid, authentication
            failed

            - 40004: Parameter error, please check the technical documentation
            and verify the parameters

            - 500: Internal server error
          example: 200
        msg:
          type: string
          description: Status message
          example: success
        data:
          $ref: '#/components/schemas/BalanceData'
    BalanceData:
      type: object
      description: |
        Account balance overview.
      properties:
        balance:
          type: number
          description: Account balance (= available_balance + unavailable_balance)
          example: 999.1
        available_balance:
          type: number
          description: Currently available balance
          example: 999.1
        unavailable_balance:
          type: number
          description: Balance pending activation
          example: 0
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: x-ti-app-id
      description: >-
        Please [Sign in to
        TextIn](https://www.textin.ai/console/dashboard/setting) and navigate to
        "Console - API Keys" to view x-ti-app-id
    SecretCodeAuth:
      type: apiKey
      in: header
      name: x-ti-secret-code
      description: >-
        Please [Sign in to
        TextIn](https://www.textin.ai/console/dashboard/setting) and navigate to
        "Console - API Keys" to view x-ti-secret-code

````