Endpoint
Authentication
Requires a developer API key in theAuthorization header.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve the current budget balance for a grant.
GET /v1/budget/balance/:grantId
Authorization header.
| Header | Value |
|---|---|
Authorization | Bearer <api_key> |
| Parameter | Type | Description |
|---|---|---|
grantId | string | The grant ID to look up |
curl https://api.grantex.dev/v1/budget/balance/grnt_01HXYZ... \
-H "Authorization: Bearer gx_..."
{
"id": "ba_01HXYZ...",
"grantId": "grnt_01HXYZ...",
"initialBudget": 100.00,
"remainingBudget": 94.50,
"currency": "USD",
"createdAt": "2026-04-05T12:00:00.000Z",
"updatedAt": "2026-04-05T14:30:00.000Z"
}
| Field | Type | Description |
|---|---|---|
id | string | Budget allocation ID |
grantId | string | The grant this budget is attached to |
initialBudget | number | The original budget amount |
remainingBudget | number | Current remaining budget |
currency | string | Currency code |
createdAt | string | ISO-8601 creation timestamp |
updatedAt | string | ISO-8601 last update timestamp |
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 404 | NOT_FOUND | No budget allocation found for this grant |
import Grantex from '@grantex/sdk';
const grantex = new Grantex({ apiKey: 'gx_...' });
const balance = await grantex.budgets.balance('grnt_01HXYZ...');
console.log(balance.remainingBudget); // 94.50
from grantex import Grantex
grantex = Grantex(api_key="gx_...")
balance = grantex.budgets.balance("grnt_01HXYZ...")
print(balance.remaining_budget) # 94.50