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

# Get credit balance

> アカウントで利用可能なクレジット残高を返します。

<Note>
  このドキュメントは英語の原文から自動翻訳されています。表現に不自然な箇所がある場合があります。正確な内容は[英語の原文](/en/api-reference/endpoints/get-credit-balance)もあわせてご確認ください。
</Note>

API キーを所有するアカウントの現在のクレジット残高を返します。

Supertone API と [Supertone Play](https://play.supertone.ai) はクレジットプールを共有しており、どちらで購入したクレジットも両方で直ちに利用可能です。

## エンドポイント

```http theme={"dark"}
GET https://supertoneapi.com/v1/credits
```

## 注意事項

* クレジットは生成オーディオの **秒数単位で差し引かれます**。
* プリセットボイスとカスタムボイスの両方が同じ残高から消費されます。
* 新規アカウントには登録時にトライアルクレジットが付与される場合があります。
* `predict_duration` はクレジットを消費しないため、コスト予測にご利用いただけます。

## 関連項目

<CardGroup cols={2}>
  <Card title="Docs: Cost and usage" icon="credit-card" href="/ja/docs/production/cost-and-usage">
    支出のモニタリングと残高アラートの設定方法。
  </Card>

  <Card title="Predict duration" icon="clock" href="/ja/api-reference/endpoints/predict-duration">
    生成前にオーディオの長さ（およびコスト）を予測します。
  </Card>
</CardGroup>


## OpenAPI

````yaml /openapi.json GET /v1/credits
openapi: 3.0.0
info:
  title: Supertone Public API
  description: >-
    Supertone API is a RESTful API for using our state-of-the-art AI voice
    models.
  version: 0.9.6
  contact: {}
servers:
  - url: https://supertoneapi.com
    description: Production
security: []
tags:
  - name: voices
    description: Voice Library API endpoints
  - name: custom_voices
    description: Custom Voice Management API endpoints
  - name: text_to_speech
    description: Text-to-Speech API endpoints
  - name: usage
    description: Usage Analytics API endpoints
paths:
  /v1/credits:
    get:
      tags:
        - usage
      summary: Retrieve credit balance
      description: Retrieves credit balance of the user.
      operationId: get_credit_balance
      parameters: []
      responses:
        '200':
          description: Credit balance of the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCreditBalanceResponse'
        '401':
          description: 'Unauthorized: Invalid API key'
        '404':
          description: 'Not Found: No user found'
        '500':
          description: 'Internal Server Error: Failed with credit system.'
      security:
        - api-key: []
components:
  schemas:
    GetCreditBalanceResponse:
      type: object
      properties:
        balance:
          type: number
          description: Credit balance of the user
          nullable: true
      required:
        - balance
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-sup-api-key

````