Admin Settings

← Back to Home

Configure development and testing options for SongPebble

Box API Settings

Control how the application interacts with the Box API

Use Mock Box API

Production Mode

When enabled, the application will use a local mock Box API instead of the real API.box service. This is useful for testing without consuming API credits or needing ngrok.

Real API Behavior:

  • • Real AI-generated songs from API.box
  • • Generation takes 2-5 minutes
  • • Consumes API credits
  • • Requires valid API_BOX_KEY
  • • Production-ready audio files

Test Scripts

Run these commands to test the Box API integration:

Full Mock Flow (Manual Callbacks)
npm run mock:box
Test Mock API with Auto-Callbacks
npm run test:box-trigger
Manual Webhook Test
npm run mock:webhook [orderId] [callbackType]

Documentation

See MOCK_BOX_API.md for detailed testing instructions.

Environment Variable

These settings modify the USE_MOCK_BOX_API environment variable. Changes take effect immediately but require a server restart for full consistency.