Skip to main content

Create Wallet

curl -X POST https://api.karen.dev/api/v1/wallets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent-wallet"}'
name
string
default:"external-wallet"
Optional human-readable name for the wallet
walletId
string
Unique identifier for the wallet
name
string
The wallet name
address
string
Solana public key (base58 encoded)
createdAt
string
ISO 8601 timestamp of wallet creation

List Wallets

curl https://api.karen.dev/api/v1/wallets \
  -H "Authorization: Bearer YOUR_API_KEY"
wallets
array
Array of wallet objects with id, name, publicKey, createdAt, and tags

Get Balance

curl https://api.karen.dev/api/v1/wallets/WALLET_ID/balance \
  -H "Authorization: Bearer YOUR_API_KEY"
sol
number
Native SOL balance
tokens
array
Array of SPL token balances

Transfer SOL

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/transfer \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "RECIPIENT_ADDRESS",
    "amount": 0.5
  }'
to
string
required
Recipient’s Solana address
amount
number
required
Amount in SOL to transfer
id
string
Transaction record ID
signature
string
Solana transaction signature
status
string
Transaction status: pending, confirmed, failed, or blocked

Swap Tokens

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/swap \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputToken": "So11111111111111111111111111111111111111112",
    "outputToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": 1.0,
    "slippageBps": 50
  }'
inputToken
string
required
Input token mint address
outputToken
string
required
Output token mint address
amount
number
required
Input token amount
slippageBps
number
default:"50"
Slippage tolerance in basis points (50 = 0.5%)
signature
string
Transaction signature
inputAmount
number
Amount of input tokens used
outputAmount
number
Amount of output tokens received

Request Airdrop

Only available on devnet/testnet for testing purposes
curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/airdrop \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1}'
amount
number
default:"1"
SOL amount to airdrop (max 2 SOL)
signature
string
Transaction signature
status
string
Transaction status

Launch Token

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/launch-token \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Token",
    "symbol": "MTK",
    "decimals": 9,
    "initialSupply": 1000000
  }'
name
string
required
Token name
symbol
string
required
Token symbol
decimals
number
default:"9"
Token decimal places
initialSupply
number
default:"1000000"
Initial token supply
mint
string
Token mint address
signature
string
Transaction signature

Mint Additional Supply

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/mint-supply \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mint": "TOKEN_MINT_ADDRESS",
    "amount": 50000,
    "decimals": 9
  }'
mint
string
required
Token mint address
amount
number
required
Amount of tokens to mint
decimals
number
default:"9"
Token decimals
signature
string
Transaction signature

Revoke Authority

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/revoke-authority \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mint": "TOKEN_MINT_ADDRESS",
    "authorityType": "mint"
  }'
mint
string
required
Token mint address
authorityType
string
default:"mint"
Authority type to revoke: “mint” or “freeze”
signature
string
Transaction signature
authorityType
string
Authority type that was revoked
revoked
boolean
Confirmation that authority was revoked

Stake SOL

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/stake \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5.0,
    "validator": "VALIDATOR_ADDRESS"
  }'
amount
number
required
Amount of SOL to stake
validator
string
Optional validator address (uses default if not specified)
stakeAccount
string
Created stake account address
signature
string
Transaction signature

Unstake SOL

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/unstake \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stakeAccount": "STAKE_ACCOUNT_ADDRESS"}'
stakeAccount
string
required
Stake account address to deactivate
signature
string
Transaction signature
deactivated
boolean
Confirmation that stake was deactivated

Withdraw Stake

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/withdraw-stake \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stakeAccount": "STAKE_ACCOUNT_ADDRESS"}'
stakeAccount
string
required
Stake account address to withdraw from
signature
string
Transaction signature
withdrawn
boolean
Confirmation that stake was withdrawn

List Stake Accounts

curl https://api.karen.dev/api/v1/wallets/WALLET_ID/stakes \
  -H "Authorization: Bearer YOUR_API_KEY"
stakes
array
Array of stake account objects with address, balance, and state

Burn Tokens

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/burn \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mint": "TOKEN_MINT_ADDRESS",
    "amount": 1000
  }'
mint
string
required
Token mint address
amount
number
required
Amount of tokens to burn
signature
string
Transaction signature

Close Token Account

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/close-account \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mint": "TOKEN_MINT_ADDRESS"}'
mint
string
required
Token mint address for account to close
signature
string
Transaction signature

Wrap SOL

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/wrap-sol \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1.0}'
amount
number
required
Amount of SOL to wrap into wSOL
signature
string
Transaction signature

Unwrap SOL

curl -X POST https://api.karen.dev/api/v1/wallets/WALLET_ID/unwrap-sol \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
signature
string
Transaction signature

Build docs developers (and LLMs) love