Skip to content

Commit 39aa792

Browse files
Adds Admin API documentation
1 parent fd94a8a commit 39aa792

File tree

4 files changed

+393
-0
lines changed

4 files changed

+393
-0
lines changed

api-reference/admin.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: 'Admin API'
3+
"og:title": "Admin API - Helius"
4+
sidebarTitle: 'Overview'
5+
description: 'Programmatic access to project usage and billing data via API key authentication.'
6+
"og:description": "Retrieve credit usage, subscription details, and per-service request counts for your Helius projects."
7+
---
8+
9+
## What is the Admin API?
10+
11+
The Admin API provides programmatic access to your project's usage and billing data. Use it to monitor credit consumption, track per-service request counts, and retrieve subscription details — all authenticated with your standard Helius API key.
12+
13+
This is useful for building internal dashboards, automating usage alerts, or integrating Helius billing data into your own systems.
14+
15+
## Authentication
16+
17+
The Admin API uses API key authentication (the same key you use for RPC and other Helius APIs). You can provide your key in one of two ways:
18+
19+
- **Header**: `X-Api-Key: YOUR_API_KEY`
20+
- **Query parameter**: `?api-key=YOUR_API_KEY`
21+
22+
<Note>
23+
The API key must belong to the project you're querying. Requests where the API key's project does not match the project ID in the path will return a `400` error.
24+
</Note>
25+
26+
## Rate Limits
27+
28+
The Admin API is rate-limited to **5 requests per second** per project.
29+
30+
## Endpoints
31+
32+
<CardGroup cols={2}>
33+
<Card title="Get Project Usage" href="/api-reference/admin/get-project-usage">
34+
Retrieve credit usage, subscription details, and per-service request counts for the current billing cycle.
35+
</Card>
36+
</CardGroup>
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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>

docs.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,19 @@
602602
}
603603
]
604604
},
605+
{
606+
"group": "Account Management APIs",
607+
"pages": [
608+
{
609+
"group": "Admin",
610+
"icon": "shield-halved",
611+
"pages": [
612+
"api-reference/admin",
613+
"api-reference/admin/get-project-usage"
614+
]
615+
}
616+
]
617+
},
605618
{
606619
"group": "Deprecated APIs",
607620
"pages": [

0 commit comments

Comments
 (0)