Sol-Incinerator Burn+Close API Documentation
Introduction
This API gives you an easy way to
Burn any token or NFT type
Close all empty token accounts, both regular and token 2022
We support both transactions that you just need to sign and send, or instructions that you can compose further.
Base URL: https://v1.api.sol-incinerator.com/
Quick Start Examples
Here are the two most common operations to get you started:
Close All Empty Token Accounts
import axios from 'axios';
import { Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
import base58 from 'bs58';
const response = await axios.post('https://v1.api.sol-incinerator.com/batch/close-all', {
userPublicKey: '4CsWE4mhp5LQDATR25sauR6umW21NQFLEsj27rSP1Muf'
}, {
headers: {
'x-api-key': 'your-api-key-here'
}
});
// Process each transaction
const connection = new Connection('https://api.mainnet-beta.solana.com');
const wallet = Keypair.fromSecretKey(/* your secret key */);
for (const serializedTx of response.data.transactions) {
const transaction = VersionedTransaction.deserialize(base58.decode(serializedTx));
transaction.sign([wallet]);
await connection.sendTransaction(transaction);
}Burn an NFT
Authentication
All endpoints except the status endpoint require an API key. Include your API key in the request headers:
or
To acquire an API key, open a ticket in the Sol Slugs Discord server.
NFT Types Supported
The API supports burning and closing the following asset types:
Tokens: Standard SPL Token Program tokens
Token2022: SPL Token-2022 Program tokens, includeing those with transfer fees enabled
Regular Metaplex NFTs: Standard Metaplex NFTs with metadata accounts
Metaplex pNFTs: Programmable NFTs with token records
Metaplex Editions: Metaplex edition NFTs derived from master editions
Metaplex pNFT Editions: Programmable NFTs with token records derived from master editions
MPL Core: Metaplex Core NFTs
NFT Types Not Supported
Magiceden Open Creator Protocol
Bubblegum cNFTs
Endpoints
GET / - Status Check
/ - Status CheckCheck if the API is online.
Response
cURL Example
POST /burn - Burn Asset
/burn - Burn AssetDestructive Operation: This permanently destroys the asset.
Creates and returns a transaction to burn the provided NFT or token.
You can also use this endpoint with an empty token account to close if desired - it's a unified handler for anything
Request Parameters
userPublicKey
string
Yes
Public key of the asset owner
assetId
string
Yes
Token account or mint address of the asset to burn
feePayer
string
No
Account to pay transaction fees (defaults to userPublicKey)
autoCloseTokenAccounts
boolean
No
Auto-close token account after burn (default: true)
priorityFeeMicroLamports
number
No
Custom priority fee in micro-lamports
asLegacyTransaction
boolean
No
Use legacy transaction format (default: false)
burnAmount
number
No
Amount to burn in atomic units (defaults to full balance)
Response
Node.js Example
cURL Example
POST /burn-instructions - Get Burn Instructions
/burn-instructions - Get Burn InstructionsDestructive Operation: These instructions permanently destroy the asset when executed.
Returns raw instructions for burning an asset and returning the rent to the user.
Request Parameters
userPublicKey
string
Yes
Public key of the asset owner
assetId
string
Yes
Token account or mint address of the asset to burn
autoCloseTokenAccounts
boolean
No
Auto-close token account after burn (default: true)
burnAmount
number
No
Amount to burn in atomic units (defaults to full balance)
Response
Node.js Example
cURL Example
POST /close - Close Token Account
/close - Close Token AccountNon-Destructive Operation: Closes an empty token account and reclaims rent.
Creates a transaction that will close the provided token account and reclaim the rent to the user.
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
assetId
string
Yes
Token account address to close
feePayer
string
No
Account to pay transaction fees
priorityFeeMicroLamports
number
No
Custom priority fee
asLegacyTransaction
boolean
No
Use legacy transaction format
Special Requirements
Token account must have zero balance
User must be the account owner or close authority
Response
Node.js Example
cURL Example
POST /close-instructions - Get Close Instructions
/close-instructions - Get Close InstructionsNon-Destructive Operation: Instructions for closing an empty token account.
Returns instructions to close the provided token account and reclaim the rent to the user.
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
assetId
string
Yes
Token account address to close
Response
Node.js Example
cURL Example
POST /batch/close-all - Close All Empty Accounts
/batch/close-all - Close All Empty AccountsNon-Destructive Operation: Batch closes all empty token accounts.
Creates transactions to close all empty accounts owned by the user, and return the rent to them.
This endpoint automatically batches into multiple transactions when required.
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
feePayer
string
No
Account to pay transaction fees
priorityFeeMicroLamports
number
No
Custom priority fee
asLegacyTransaction
boolean
No
Use legacy transaction format
Response
Node.js Example
cURL Example
POST /batch/close-all-instructions - Get All Close Instructions
/batch/close-all-instructions - Get All Close InstructionsNon-Destructive Operation: Returns instructions for closing all empty accounts.
Creates sets of instructions to close all empty accounts owned by the user, and return the rent to them.
One instruction group = one account closed. You can batch multiple into a single TX, but it adds complexity - see
/batch/close-allif you want this behavior handled for you
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
Response
Node.js Example
cURL Example
Preview Endpoints
Preview endpoints allow you to see what would happen before executing operations. These are useful for showing users expected fees and reclaimed amounts.
POST /burn/preview - Preview Burn Operation
/burn/preview - Preview Burn OperationGet detailed information about what would happen if you burned an asset.
Request Parameters
userPublicKey
string
Yes
Public key of the asset owner
assetId
string
Yes
Token account or mint address of the asset to burn
autoCloseTokenAccounts
boolean
No
Auto-close token account after burn (default: true)
burnAmount
number
No
Amount to burn in atomic units (defaults to full balance)
Response
cURL Example
POST /close/preview - Preview Close Operation
/close/preview - Preview Close OperationGet detailed information about what would happen if you closed a token account.
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
assetId
string
Yes
Token account address to close
reclaimDestination
string
No
Where to send reclaimed SOL (defaults to userPublicKey)
Response
cURL Example
POST /batch/close-all/preview - Preview Batch Close All
/batch/close-all/preview - Preview Batch Close AllGet comprehensive preview of all accounts that would be closed and their details.
Request Parameters
userPublicKey
string
Yes
Public key of the account owner
Response
cURL Example
Fees
The API charges service fees for burning and closing operations. Fees are automatically deducted from the rent reclaimed.
Token Account Fees
For standard token accounts (SPL Token and Token-2022), the fee is calculated as:
Since most token accounts contain exactly 2,039,280 lamports of rent, the typical fee is:
39,280 lamports (0.000039 SOL) per token account
You receive: 2,000,000 lamports (0.002 SOL) per token account closed/burned.
NFT Fees
NFT burning fees are fixed amounts based on the NFT type:
Standard Metaplex NFT
509,600
0.0005096
Edition NFT
224,240
0.00022424
Programmable NFT (pNFT)
1,957,280
0.00195728
Programmable Edition NFT
1,671,920
0.00167192
Note: Resized NFTs use the same fee structure as their non-resized counterparts.
MPL Core NFT Fees
For MPL Core NFTs, the fee is calculated as:
Where Rent Reclaimed = Total Account Rent - 897,840 lamports (retained by metaplex protocol)
Parameter Default Behavior
Required Parameters
userPublicKey: Must be provided for all endpointsassetId: Required for single asset operations (burn/close)
Optional Parameters Default Values
feePayer: Defaults touserPublicKeyautoCloseTokenAccounts: Defaults totrueasLegacyTransaction: Defaults tofalsepriorityFeeMicroLamports: Automatically calculated if not providedburnAmount: Defaults to full token balance
Notes
If
burnAmountis not set to the full token balance, the account cannot be closed, and rent will not be reclaimed.If
autoCloseTokenAccountsis set tofalse, rent will not be reclaimed (closing accounts claims rent)
Destructive vs Non-Destructive Operations
Destructive Operations (Irreversible)
/burn- Permanently destroys tokens/NFTs/empty token accounts/burn-instructions- Instructions that destroy tokens/NFTs
Warning: These operations cannot be undone. Assets are permanently removed from circulation.
Non-Destructive Operations (Reversible)
/close- Closes empty accounts (new accounts can be created)/close-instructions- Instructions for closing accounts/batch/close-all- Batch close empty accounts/batch/close-all-instructions- Instructions for batch closing
These operations only reclaim rent from empty accounts and can be reversed by reopening the same token accounts.
Error Handling
The API returns standard HTTP status codes:
200: Success400: Bad request (invalid parameters, insufficient balance, etc.)401: Unauthorized (missing or invalid API key)500: Internal server error
Example error response:
Rate Limiting
There is currently no rate limiting in place. This is subject to change.
Support
For API key requests or technical support, open a ticket in the Sol Slugs Discord server.
Last updated