billing.get
Your credits: plan credits left this month, prepaid USDC credits, auto top-up.
Details
- Endpoint
- GET /v1/billing
- Credits
- Free
- Rate class
- Light. Counts against your light requests per second.
Returns the plan's credits used and left this month, the prepaid credits bought with USDC (spent only after the monthly credits), `available` (both together), the rate ($3 per million credits, so 1 USDC buys 333,333 credits), the treasury address payments go to, and the auto top-up settings. Send your API key or a dashboard session. Costs nothing.
Parameters
This method takes no parameters.
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl
curl "https://api.tide.ad/v1/billing" \
-H "x-api-key: YOUR_API_KEY"TypeScript
const res = await fetch("https://api.tide.ad/v1/billing", {
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
},
});
const data = await res.json();Response
JSON
{
"address": "0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e",
"plan": "free",
"month": {
"used": 5000000,
"limit": 5000000,
"remaining": 0,
"overage": 0
},
"prepaid": {
"credits": 3333333,
"bought": 3333333,
"spent": 0
},
"available": 3333333,
"rate": {
"usdPerMillionCredits": 3,
"creditsPerUsd": 333333
},
"treasury": "0x3d651ddf154835f6cd20e107a9a957b05cc701b9a492a7f680a0a4c3b5d8b0f1",
"autoTopup": null
}