Configuration
Configure turnip with your API keys and deployment settings. All configuration is done through environment variables in a .env file.
Environment Variables
Create a .env file in your project root with the following variables:
# OpenAI API Key (required for image generation) OPENAI_API_KEY="sk-..." # Helius API Key (required for Solana RPC) HELIUS_API_KEY="your-helius-api-key" # Solana Wallet Private Key (base58 format) WALLET_PRIVATE_KEY="your-base58-private-key" # pump.fun API is accessed automatically via your wallet # No separate API key required # Image Generation Settings IMAGE_QUALITY="high" # low, medium, high IMAGE_SIZE="1024x1024" # 1024x1024, 1536x1024, 1024x1536 IMAGE_FORMAT="png" # png, jpeg, webp # Token Settings TOKEN_SYMBOL_PREFIX="TURNIP" DEV_BUY_AMOUNT="0.1" # SOL amount for dev buy SLIPPAGE="10" # Slippage percentage
Required Variables
OPENAI_API_KEYYour OpenAI API key for GPT Image 1.5 access. Get one from the OpenAI Dashboard.
Note: Ensure your account has access to image generation models.
HELIUS_API_KEYHelius API key for Solana RPC access. Sign up for free at helius.dev.
The free tier provides 100,000 requests/day.
WALLET_PRIVATE_KEYYour Solana wallet private key in base58 format. This wallet will deploy tokens and pay gas fees.
Security Warning: Never share your private key. Use a dedicated wallet with limited funds for token deployment.
Image Generation Settings
IMAGE_QUALITYImage quality setting. Higher quality = more tokens = higher cost.
low - 272 tokensmedium - 1056 tokenshigh - 4160 tokensIMAGE_SIZEOutput image dimensions. Square images generate fastest.
1024x1024 - Square1536x1024 - Landscape1024x1536 - PortraitIMAGE_FORMATOutput format. PNG supports transparency; JPEG is faster.
png - Lossless, transparencyjpeg - Faster generationwebp - Modern, smaller filesToken Deployment Settings
DEV_BUY_AMOUNTAmount of SOL to buy of your own token on launch. This provides initial liquidity.
Default: 0.1 SOL. Set to 0 for no dev buy.
SLIPPAGEMaximum slippage percentage for the dev buy transaction.
Default: 10%. Higher values = more likely to succeed but may get worse price.
Verify Configuration
Test your configuration by running the config check command:
$ turnip config --check✓ OpenAI API Key: Valid ✓ Helius RPC: Connected (mainnet-beta) ✓ Wallet: Connected (balance: 1.5 SOL) ✓ pump.fun: Ready All systems operational!
