Quickstart
Create an API key, register a wallet, and read its gas health.
1. Create an API key
In the GasTanker workspace, an owner or admin opens API keys and creates a key. Creating a key needs a second-factor check, and the key is shown once, so store it in your secrets manager straight away.
Choose Read + register wallets if your integration registers wallets or asks GasTanker to check a wallet. Choose Read only for everything else.
2. Register a wallet
network is a network ID from GET /v1/networks, which lists the networks this deployment accepts for new wallets, each with its native asset's symbol and decimals:
curl https://api.gastanker.xyz/v1/networks \
-H "X-API-Key: $GASTANKER_API_KEY"{
"data": [
{ "id": "base", "name": "Base", "family": "evm", "environment": "mainnet", "nativeAsset": { "symbol": "ETH", "decimals": 18 } }
]
}Register the wallet on one of them. The address must be valid for that network:
curl https://api.gastanker.xyz/v1/wallets \
-H "X-API-Key: $GASTANKER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "network": "base", "address": "0x7a2...", "label": "Payouts – EU" }'The response is the wallet, with the id you use from now on:
{
"id": "wal_01...",
"organizationId": "org_01...",
"networkId": "base",
"address": "0x7a2...",
"label": "Payouts – EU",
"verificationStatus": "unverified"
}3. Set a gas policy
In the workspace, open Policies and give the wallet a threshold and a target. The workspace takes them in the network's native asset (ETH on Base); the API returns them in the wallet network's native base units (wei on Base). A wallet is low when its balance is below the threshold; the target is the balance GasTanker aims for. Until the wallet has an active policy, its health is unknown.
4. Read gas health
curl https://api.gastanker.xyz/v1/wallets/wal_01.../gas \
-H "X-API-Key: $GASTANKER_API_KEY"{
"networkId": "base",
"balanceBaseUnits": "4200000000000000",
"health": "low",
"ready": false,
"readyBlockedBy": "BELOW_THRESHOLD",
"monitoring": {
"status": "healthy",
"lastSuccessfulAt": "2026-10-07T09:15:02Z",
"consecutiveFailures": 0
}
}If GasTanker can't read the balance reliably, health is unknown. It never guesses. ready is true only when the wallet can be relied on to pay for gas right now; check it before a transaction that spends gas. Gas health and operations explains readyBlockedBy.
5. Ask GasTanker to check the wallet
curl https://api.gastanker.xyz/v1/gas/ensure \
-H "X-API-Key: $GASTANKER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "walletId": "wal_01..." }'A healthy wallet returns { "status": "healthy", "operation": null }. A low wallet returns the gas operation GasTanker recorded, and your team gets an alert. Gas health and operations explains both.