|
| 1 | +--- |
| 2 | +title: "Get Project Usage" |
| 3 | +"og:title": "Get Project Usage - Helius Admin API" |
| 4 | +sidebarTitle: "Get Project Usage" |
| 5 | +description: "Retrieve credit usage, subscription details, and per-service request counts for a project within the current billing cycle." |
| 6 | +"og:description": "Get credit usage, billing details, and request counts for a Helius project" |
| 7 | +openapi: "/openapi/admin-api/getProjectUsage.yaml GET /admin/projects/{id}/usage" |
| 8 | +--- |
| 9 | + |
| 10 | +## Overview |
| 11 | + |
| 12 | +Returns a complete picture of a project's credit consumption for the current billing cycle, including credits remaining, subscription plan details, and a breakdown of requests by service type (RPC, DAS, gRPC, WebSocket, etc.). |
| 13 | + |
| 14 | +## Request Parameters |
| 15 | + |
| 16 | +<ParamField path="id" type="string" required> |
| 17 | + The project ID to retrieve usage for. Must match the project associated with the API key used for authentication. |
| 18 | +</ParamField> |
| 19 | + |
| 20 | +## Response Fields |
| 21 | + |
| 22 | +<ParamField body="creditsRemaining" type="number"> |
| 23 | + Credits remaining in the current billing cycle. Calculated as the plan's credit limit minus regular credits consumed, floored at zero. |
| 24 | +</ParamField> |
| 25 | + |
| 26 | +<ParamField body="creditsUsed" type="number"> |
| 27 | + Total credits consumed in the current billing cycle, including both regular and prepaid credits. |
| 28 | +</ParamField> |
| 29 | + |
| 30 | +<ParamField body="prepaidCreditsRemaining" type="number"> |
| 31 | + Prepaid credits still available. |
| 32 | +</ParamField> |
| 33 | + |
| 34 | +<ParamField body="prepaidCreditsUsed" type="number"> |
| 35 | + Prepaid credits consumed in the current billing cycle. |
| 36 | +</ParamField> |
| 37 | + |
| 38 | +<ParamField body="subscriptionDetails" type="object"> |
| 39 | + Subscription plan and billing cycle information. |
| 40 | +</ParamField> |
| 41 | + |
| 42 | +<ParamField body="subscriptionDetails.billingCycle.start" type="string"> |
| 43 | + Billing cycle start date in `YYYY-MM-DD` format. |
| 44 | +</ParamField> |
| 45 | + |
| 46 | +<ParamField body="subscriptionDetails.billingCycle.end" type="string"> |
| 47 | + Billing cycle end date in `YYYY-MM-DD` format. |
| 48 | +</ParamField> |
| 49 | + |
| 50 | +<ParamField body="subscriptionDetails.creditsLimit" type="number"> |
| 51 | + Total credit allowance for the billing cycle based on your plan. |
| 52 | +</ParamField> |
| 53 | + |
| 54 | +<ParamField body="subscriptionDetails.plan" type="string"> |
| 55 | + The name of the subscription plan (e.g., `"business"`, `"professional"`). |
| 56 | +</ParamField> |
| 57 | + |
| 58 | +<ParamField body="usage" type="object"> |
| 59 | + Request counts broken down by service type. Each field is the total number of requests made to that service during the current billing cycle. |
| 60 | +</ParamField> |
| 61 | + |
| 62 | +<ParamField body="usage.api" type="number"> |
| 63 | + Enhanced API requests (e.g., parsed transactions, token metadata). |
| 64 | +</ParamField> |
| 65 | + |
| 66 | +<ParamField body="usage.archival" type="number"> |
| 67 | + Archival RPC requests. |
| 68 | +</ParamField> |
| 69 | + |
| 70 | +<ParamField body="usage.das" type="number"> |
| 71 | + DAS (Digital Asset Standard) API requests. |
| 72 | +</ParamField> |
| 73 | + |
| 74 | +<ParamField body="usage.grpc" type="number"> |
| 75 | + gRPC streaming requests. |
| 76 | +</ParamField> |
| 77 | + |
| 78 | +<ParamField body="usage.grpcGeyser" type="number"> |
| 79 | + Geyser gRPC requests. |
| 80 | +</ParamField> |
| 81 | + |
| 82 | +<ParamField body="usage.photon" type="number"> |
| 83 | + ZK Compression (Photon) requests. |
| 84 | +</ParamField> |
| 85 | + |
| 86 | +<ParamField body="usage.rpc" type="number"> |
| 87 | + Standard Solana RPC requests. |
| 88 | +</ParamField> |
| 89 | + |
| 90 | +<ParamField body="usage.stream" type="number"> |
| 91 | + LaserStream data streaming requests. |
| 92 | +</ParamField> |
| 93 | + |
| 94 | +<ParamField body="usage.webhook" type="number"> |
| 95 | + Webhook delivery events. |
| 96 | +</ParamField> |
| 97 | + |
| 98 | +<ParamField body="usage.websocket" type="number"> |
| 99 | + WebSocket subscription requests. |
| 100 | +</ParamField> |
0 commit comments