Skip to main content

Environments

SafeBank has two environments. They are fully isolated — data, keys, and on-chain state never cross between them. The key you use decides the environment.

Sandbox (TEST)Live (LIVE)
Key prefixsb_test_…sb_live_…
Base URLhttps://api.sandbox.safebank.aihttps://api.safebank.ai
ChainBase Sepolia (84532, testnet)Base (8453, mainnet)
FundsTest USDC via the faucetReal USDC
FaucetEnabled (rate-limited)Disabled

Start in sandbox. Everything in the Quickstart runs there with no real money.

Key format

Keys look like sb_<env>_<pubId>_<secret>, e.g. sb_test_Ab12Cd34Ef56_xxxxxxxxxxxx. Only the environment prefix and the public id (pubId) are ever shown after creation — the secret is returned once, at creation time. In API responses the environment appears as the uppercase environment field (TEST / LIVE).

Base URL

The SDK infers the base URL from the key prefix, so you rarely set it by hand:

new SafeBank({ apiKey: 'sb_test_...' }) // → https://api.sandbox.safebank.ai
new SafeBank({ apiKey: 'sb_live_...' }) // → https://api.safebank.ai

Override it when you need to (e.g. a local API) via the baseUrl option, the CLI --base-url flag, or the SAFEBANK_API_URL env var.

Authentication header

Every request carries the key in one of two accepted headers:

curl https://api.sandbox.safebank.ai/v1/wallets \
-H "X-SafeBank-Api-Key: sb_test_..."

The SDK sends X-SafeBank-Api-Key (to avoid colliding with the Privy Authorization bearer used by the dashboard). Both are equivalent for developer keys. See Authentication for scopes and the underlying PrincipalGuard.

The test chain (Base Sepolia)

Sandbox wallets and payments settle on Base Sepolia:

FieldValue
Chain nameBase Sepolia
chainId84532
Testnetyes
Test USDC0x036CbD53842c5426634e7929541eC2318f3dCF7e

Live uses Base mainnet (chainId 8453, USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). These values are also served at runtime from GET /v1/capabilities, which is the authoritative source per environment — read it rather than hard-coding a chain map.

Faucet caps

The sandbox faucet (Funding) is TEST-only and rate-limited:

AssetDefault dripMax per drip
USDC2501000
ETH0.020.02

Drips are additionally rate-limited per wallet and per tenant. A POST to /v1/wallets/{id}/fund against a live key is rejected — there is no live faucet.

warning

Sandbox signers, wallets, and funds are for testing only. Never reuse a sandbox demo signer or its private key with real funds on live.