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

# プロジェクト使用量の取得

> クレジット使用量、サブスクリプションの詳細、および現在の請求サイクル内のサービスごとのリクエスト数を取得します。

## 概要

プロジェクトのクレジット消費に関する完全な情報を、現在の請求サイクル中に残っているクレジット、サブスクリプションプランの詳細、サービスタイプ（RPC、DAS、gRPC、WebSocketなど）ごとのリクエストの内訳を含めて返します。

## リクエストパラメーター

<ParamField path="id" type="string" required>
  使用量を取得するプロジェクトID。認証に使用されるAPIキーに関連付けられているプロジェクトと一致している必要があります。
</ParamField>

## レスポンスフィールド

<ParamField body="creditsRemaining" type="number">
  現在の請求サイクルで残っているクレジット。プランのクレジット制限から通常のクレジット消費を引いたものがゼロに切り捨てられています。
</ParamField>

<ParamField body="creditsUsed" type="number">
  現在の請求サイクルで消費されたクレジットの総計です。通常のクレジットと前払いクレジットの両方を含みます。
</ParamField>

<ParamField body="prepaidCreditsRemaining" type="number">
  まだ利用可能な前払いクレジット。
</ParamField>

<ParamField body="prepaidCreditsUsed" type="number">
  現在の請求サイクルで消費された前払いクレジット。
</ParamField>

<ParamField body="subscriptionDetails" type="object">
  サブスクリプションプランと請求サイクルの情報。
</ParamField>

<ParamField body="subscriptionDetails.billingCycle.start" type="string">
  請求サイクルの開始日。
</ParamField>

<ParamField body="subscriptionDetails.billingCycle.end" type="string">
  請求サイクルの終了日。
</ParamField>

<ParamField body="subscriptionDetails.creditsLimit" type="number">
  プランに基づく請求サイクルのクレジット許容量の総計。
</ParamField>

<ParamField body="subscriptionDetails.plan" type="string">
  サブスクリプションプランの名前。
</ParamField>

<ParamField body="credits" type="object">
  現在の請求サイクルの製品ごとのクレジット消費。すべての製品をカバーします。値は一旦生もののまま積算され、最後に丸められて請求に一致します。そのため、製品ごとのクレジットは丸め後も完全には一致しない場合があります。
</ParamField>

<ParamField body="credits.rpc" type="number">
  標準Solana RPCによって消費されたクレジット。
</ParamField>

<ParamField body="credits.enhancedApi" type="number">
  Enhanced API（例：解析されたトランザクション、トークンメタデータ）によって消費されたクレジット。
</ParamField>

<ParamField body="credits.walletApi" type="number">
  Wallet APIによって消費されたクレジット。
</ParamField>

<ParamField body="credits.das" type="number">
  DAS（Digital Asset Standard）APIによって消費されたクレジット。
</ParamField>

<ParamField body="credits.webhooks" type="number">
  Webhooksによって消費されたクレジット。
</ParamField>

<ParamField body="credits.laserstreamGrpc" type="number">
  LaserStream gRPC（帯域幅計測）によって消費されたクレジット。
</ParamField>

<ParamField body="credits.laserstreamWebsocket" type="number">
  LaserStream WebSocket（帯域幅計測）によって消費されたクレジット。
</ParamField>

<ParamField body="credits.preConfirmations" type="number">
  Pre Confirmationsによって消費されたクレジット。
</ParamField>

<ParamField body="credits.archival" type="number">
  Archivalによって消費されたクレジット。
</ParamField>

<ParamField body="credits.photon" type="number">
  Photon（ZK Compression）によって消費されたクレジット。
</ParamField>

<ParamField body="credits.other" type="number">
  未分類の使用によって消費されたクレジット。
</ParamField>

<ParamField body="requests" type="object">
  現在の請求サイクルのためのリクエストカウント。リクエスト計測製品のみです。帯域幅計測のLaserStream製品はここには表示されず、他の場所で確認してください。フィールド:
</ParamField>

<ParamField body="dataTransfer" type="object">
  帯域幅計測のLaserStream製品のみのための現在の請求サイクルで転送されるバイト数。これらの製品はリクエスト数ではなく転送データによって課金されるので、他の場所に表示されますが、ここには表示されません。フィールド:
</ParamField>

## リクエストパラメーター

<ParamField body="id" type="string" required>
  使用量を取得するプロジェクトID。APIキーに関連付けられているプロジェクトと一致している必要があります。
</ParamField>


## OpenAPI

````yaml ja/openapi/admin-api/getProjectUsage.yaml GET /v0/admin/projects/{id}/usage
openapi: 3.0.3
info:
  title: Helius Admin API
  description: |
    プロジェクトの使用状況と請求データへのプログラムによるアクセス。

    ## 認証

    すべてのリクエストには、以下のいずれかの方法で渡されるAPIキーが必要です。
    - ヘッダー: `X-Api-Key: YOUR_API_KEY`
    - クエリパラメータ: `?api-key=YOUR_API_KEY`
  version: 1.0.0
  contact:
    name: APIサポート
    url: https://helius.dev
servers:
  - url: https://admin-api.helius.xyz
    description: 本番サーバー
security:
  - ApiKeyQuery: []
  - ApiKeyHeader: []
paths:
  /v0/admin/projects/{id}/usage:
    get:
      tags:
        - Admin
      summary: プロジェクト使用状況の取得
      description: >
        プロジェクトの現在の請求サイクル内でのクレジット使用、サブスクリプション詳細、およびサービス別リクエスト数を取得します。


        認証に使用するAPIキーは、パスで指定されたプロジェクトに属している必要があります。APIキーのプロジェクトが`id`パラメータと一致しない場合、リクエストは`400`エラーを返します。
      operationId: getProjectUsage
      parameters:
        - name: id
          in: path
          required: true
          description: 使用状況を取得するプロジェクトID。APIキーに関連付けられたプロジェクトと一致する必要があります。
          schema:
            type: string
            format: uuid
            example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      responses:
        '200':
          description: プロジェクトの使用状況が正常に取得されました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectUsageResponse'
              example:
                creditsRemaining: 486100
                creditsUsed: 13900
                prepaidCreditsRemaining: 50000
                prepaidCreditsUsed: 0
                subscriptionDetails:
                  billingCycle:
                    start: '2026-04-01'
                    end: '2026-05-01'
                  creditsLimit: 500000
                  plan: business
                credits:
                  rpc: 4500
                  enhancedApi: 1200
                  walletApi: 0
                  das: 5000
                  webhooks: 800
                  laserstreamGrpc: 1500
                  laserstreamWebsocket: 800
                  preConfirmations: 100
                  archival: 0
                  photon: 0
                  other: 0
                requests:
                  rpc: 4500
                  enhancedApi: 1200
                  walletApi: 0
                  das: 5000
                  webhooks: 800
                  preConfirmations: 50
                  archival: 0
                  photon: 0
                  other: 0
                dataTransfer:
                  laserstreamGrpc: 15000000
                  laserstreamWebsocket: 8000000
        '400':
          description: Bad Request — パス内のプロジェクトIDがAPIキーに関連付けられたプロジェクトと一致しません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 400
                message: 無効なプロジェクトID
                error: Bad Request
        '401':
          description: Unauthorized — APIキーが欠落している、異常である、または見つかりません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 401
                message: 欠落または無効なAPIキー
                error: Unauthorized
        '403':
          description: Forbidden — このプロジェクトにはAdmin APIが有効になっていません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 403
                message: このプロジェクトに対してAdmin APIが有効になっていません
                error: Forbidden
        '429':
          description: Too Many Requests — 1秒あたり5件のリクエスト制限を超えました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 429
                message: 'ThrottlerException: Too Many Requests'
                error: Too Many Requests
        '500':
          description: 'Internal Server Error — サーバー側のエラーが発生しました（例: 請求データの欠落）。'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 500
                message: 内部サーバーエラー
                error: Internal Server Error
components:
  schemas:
    ProjectUsageResponse:
      type: object
      properties:
        creditsRemaining:
          type: number
          description: >-
            現在の請求サイクルで残っているクレジット数。`creditsLimit -
            regularCreditsUsed`として計算され、0で切り捨てられます。
          example: 487500
        creditsUsed:
          type: number
          description: 現在の請求サイクルで消費された合計クレジット数（通常および事前払いクレジットを含む）。
          example: 12500
        prepaidCreditsRemaining:
          type: number
          description: 残っている事前払いクレジット数。
          example: 50000
        prepaidCreditsUsed:
          type: number
          description: 現在の請求サイクルで消費された事前払いクレジット数。
          example: 0
        subscriptionDetails:
          type: object
          description: プロジェクトのサブスクリプションプランと現在の請求サイクルに関する詳細。
          properties:
            billingCycle:
              type: object
              description: 現在の請求サイクルの開始日と終了日。
              properties:
                start:
                  type: string
                  description: 請求サイクル開始日。
                  example: '2026-04-01'
                end:
                  type: string
                  description: 請求サイクル終了日。
                  example: '2026-05-01'
            creditsLimit:
              type: number
              description: プランに基づいた現在の請求サイクルのクレジット許容量。
              example: 500000
            plan:
              type: string
              description: サブスクリプションプランの名前。
              example: business
        credits:
          type: object
          description: |
            現在の請求サイクルでの製品別クレジット消費量（クレジット単位）。
            すべての製品を対象とします。値は生データで累積され、最終的に丸められ、請求と一致するように
            丸めるため、製品別クレジットは丸めた後に`creditsUsed`と正確に一致しない場合があります。
          properties:
            rpc:
              type: number
              description: 標準Solana RPCによって消費されたクレジット数。
              example: 4500
            enhancedApi:
              type: number
              description: 'Enhanced API（例: 解析されたトランザクション、トークンメタデータ）によって消費されたクレジット数。'
              example: 1200
            walletApi:
              type: number
              description: Wallet APIによって消費されたクレジット数。
              example: 0
            das:
              type: number
              description: DAS（Digital Asset Standard）APIによって消費されたクレジット数。
              example: 5000
            webhooks:
              type: number
              description: Webhooksによって消費されたクレジット数。
              example: 800
            laserstreamGrpc:
              type: number
              description: LaserStream gRPC（帯域幅メーター）によって消費されたクレジット数。
              example: 1500
            laserstreamWebsocket:
              type: number
              description: LaserStream WebSocket（帯域幅メーター）によって消費されたクレジット数。
              example: 800
            preConfirmations:
              type: number
              description: Pre Confirmationsによって消費されたクレジット数。
              example: 100
            archival:
              type: number
              description: Archivalによって消費されたクレジット数。
              example: 0
            photon:
              type: number
              description: Photon（ZK Compression）によって消費されたクレジット数。
              example: 0
            other:
              type: number
              description: 分類されていない使用によって消費されたクレジット数。
              example: 0
        requests:
          type: object
          description: |
            現在の請求サイクルのリクエスト件数（リクエストメーター製品のみ）。
            帯域幅メーターのLaserStream製品（`laserstreamGrpc`、`laserstreamWebsocket`）は
            ここには表示されません。`dataTransfer`を参照してください。
          properties:
            rpc:
              type: number
              description: 標準Solana RPCリクエストの数。
              example: 4500
            enhancedApi:
              type: number
              description: Enhanced APIリクエストの数。
              example: 1200
            walletApi:
              type: number
              description: Wallet APIリクエストの数。
              example: 0
            das:
              type: number
              description: DAS（Digital Asset Standard）APIリクエストの数。
              example: 5000
            webhooks:
              type: number
              description: Webhook配信イベントの数。
              example: 800
            preConfirmations:
              type: number
              description: Pre Confirmationsリクエストの数。
              example: 50
            archival:
              type: number
              description: アーカイバルRPCリクエストの数。
              example: 0
            photon:
              type: number
              description: Photon（ZK Compression）リクエストの数。
              example: 0
            other:
              type: number
              description: 分類されていないリクエストの数。
              example: 0
        dataTransfer:
          type: object
          description: >
            現在の請求サイクルの転送バイト数（帯域幅メーターのLaserStream製品のみ）。これらの製品は、リクエスト数ではなく、転送されたデータによって請求されるため、ここおよび`credits`に表示され、`requests`には表示されません。
          properties:
            laserstreamGrpc:
              type: number
              description: LaserStream gRPC経由で転送されたバイト数。
              example: 15000000
            laserstreamWebsocket:
              type: number
              description: LaserStream WebSocket経由で転送されたバイト数。
              example: 8000000
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTPステータスコード。
        message:
          type: string
          description: 人間が読み取れるエラーメッセージ。
        error:
          type: string
          description: HTTPエラー名。
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: クエリパラメータとして渡されるAPIキー。
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: リクエストヘッダーとして渡されるAPIキー。

````