API Keys
Most read endpoints work without a key; images (token logos, NFT and collection images) need one. A key also raises your rate limits and tracks your usage.
Create a key
The dashboard is the easy way. From code, sign {address}:{timestamp} with your wallet and send the signature with the request:
import { Wallet } from 'xrpl';
import { sign } from 'ripple-keypairs';
// the seed prefix decides the algorithm: sEd… is ed25519, any other s… is secp256k1
const wallet = Wallet.fromSeed(seed, { algorithm: seed.startsWith('sEd') ? 'ed25519' : 'ecdsa-secp256k1' });
const timestamp = Date.now().toString();
const signature = sign(Buffer.from(`${wallet.address}:${timestamp}`).toString('hex'), wallet.privateKey);
const res = await fetch('https://api.xrpl.to/v1/keys', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Wallet': wallet.address,
'X-Signature': signature,
'X-Timestamp': timestamp,
'X-Public-Key': wallet.publicKey
},
body: JSON.stringify({
project: {
name: 'My App', // 2-64 characters
url: 'https://myapp.example', // https only
category: 'analytics', // wallet | explorer | trading_bot | analytics | ai_agent | other
description: 'What it does', // 10-300 characters
expectedDaily: '1k-10k', // lt1k | 1k-10k | 10k-100k | 100k+
contact: '@myapp' // optional: an email or an X handle
},
agreePolicy: true
})
});
const { apiKey } = await res.json(); // shown once — store it now| Header | Value |
|---|---|
| X-Wallet | Your XRPL r-address |
| X-Signature | Hex signature of message "{wallet}:{timestamp}" |
| X-Timestamp | Unix milliseconds timestamp (5 min validity window) |
| X-Public-Key | Hex public key (always required for /user and /watchlist signed routes; optional for /keys routes after first on-ledger transaction) |
Use a key
| Where | How |
|---|---|
| Header (recommended) | X-Api-Key: xrpl_… |
| Query string | ?apiKey=xrpl_… |
| WebSocket | wss://api.xrpl.to/ws/sync?apiKey=xrpl_… |
Key endpoints
- POST
/v1/keysCreate new API key (1 active key on free tier, 5 on paid tiers) - GET
/v1/keys/{wallet}wallet signatureList API keys for wallet - DELETE
/v1/keys/{wallet}/{id}wallet signatureRevoke API key (first call revokes; calling again on a revoked key permanently deletes it) - PUT
/v1/keys/{wallet}/{id}wallet signatureRename an active API key (metadata only) - GET
/v1/keys/{wallet}/creditswallet signatureRemaining credits and billing info - GET
/v1/keys/{wallet}/usagewallet signatureUsage breakdown by key and endpoint - GET
/v1/keys/costsPer-endpoint credit costs - GET
/v1/keys/{wallet}/logswallet signatureRecent API request logs for a wallet