External Services Setup Guide (API) β
This guide explains step by step how to obtain and configure the API keys required to run all of TuneCamp's integrations.
1. Payments & Monetization β
Stripe (Fiat & Onramp) β
- Go to the Stripe Dashboard.
- Secret Key: Go to Developers > API Keys and copy the
Secret key(sk_test_...orsk_live_...). - Webhook Secret:
- Go to Developers > Webhooks.
- Add an endpoint:
https://your-domain.com/api/payments/stripe/webhook. - Select the event:
checkout.session.completed. - Important (multi-artist instances): Enable the "Listen to events on connected accounts" option on the endpoint. Without this checkbox, payments made on artists' Stripe Connect accounts will not trigger the webhook and no unlock code will be generated.
- Copy the "Signing secret" (
whsec_...).
- Crypto Onramp: Request access to "Crypto Onramp" in your Stripe settings and copy the related key.
Stripe Connect (artist onboarding β multi-artist instances only) β
Stripe Connect lets you route fiat payments directly to each artist's Stripe account, with the instance's commission automatically withheld as an application_fee. It is not required for single-artist instances.
- Make sure you have a Stripe account with the Connect features enabled (Settings > Connect settings in the dashboard).
- From the TuneCamp Admin panel β artist β use the following endpoints (managed via the Admin UI):
POST /api/admin/artists/:id/stripe-connect/onboardβ creates or reuses an Express Stripe account for the artist and returns the KYC onboarding link to send to the artist.GET /api/admin/artists/:id/stripe-connect/statusβ checkschargesEnabled,payoutsEnabled,detailsSubmitted.DELETE /api/admin/artists/:id/stripe-connectβ disconnects the account (does not delete it on Stripe).
- The artist completes KYC directly on the Stripe-hosted page.
- As long as
chargesEnabled = false, the artist's checkouts fall back to the instance account. - No new environment variable required: onboarding reuses the already-configured
STRIPE_SECRET_KEY.
MoonPay (alternative Onramp) β
- Sign up at MoonPay Dashboard.
- Create a new API Key for the Onramp integration on the Base network.
2. Artificial Intelligence β
OpenRouter (Metadata & Recommendations) β
- Go to OpenRouter.ai.
- Create an account and go to the Keys section.
- Create a new API key.
- (Optional) If you want to use free models, make sure to set
openrouter_modeltoopenrouter/free(the default behavior).
3. Cloud Storage β
Google Drive (Streaming & Import) β
- Go to the Google Cloud Console.
- Create a new project.
- Enable the Google Drive API.
- Go to APIs & Services > Credentials.
- Create an OAuth 2.0 Client ID (type "Web application").
- Add the authorized redirect URIs:
https://your-domain.com/api/storage/gdrive/callback. - Copy the
Client IDand theClient Secret.
4. Messaging & Social β
Telegram Bot (Quick Ingestion) β
- Search for @BotFather on Telegram.
- Send the
/newbotcommand and follow the instructions. - Copy the API Token provided at the end.
- For security, use your own user ID as
TUNECAMP_TELEGRAM_MASTER_ID. You can find it using @userinfobot.
5. Peer-to-Peer (P2P) β
Soulseek (Search & Download) β
- No API Key is needed, but a standard Soulseek account is required.
- Download the original Soulseek client or register through a compatible client.
- Use your
UsernameandPasswordin the TuneCamp settings.
6. Server Configuration β
All of these keys can be configured in two ways:
Method A: .env file (recommended for development) β
Create a .env file in the project root:
STRIPE_SECRET_KEY=sk_...
STRIPE_WEBHOOK_SECRET=whsec_...
OPENROUTER_API_KEY=sk-or-v1-...
TUNECAMP_GDRIVE_CLIENT_ID=...
TUNECAMP_GDRIVE_CLIENT_SECRET=...
TUNECAMP_TELEGRAM_BOT_TOKEN=...
TUNECAMP_TELEGRAM_MASTER_ID=...
SLSK_USER=...
SLSK_PASS=...Method B: Admin Dashboard (recommended for production) β
Many of these keys can be entered directly in TuneCamp's Admin interface under the Settings section. Values entered here take precedence over the .env file and are stored in the SQLite database.
7. Model Context Protocol (MCP) β
If you want to connect an external AI chatbot (e.g. Claude Desktop) to TuneCamp, you can use the built-in MCP server. Clients authenticate with per-user personal tokens (Bearer tc_...) that can be generated from your Profile in the webapp. For the setup guide and how to use the bridge script, see mcp-setup-guide.md.
Verification β
After entering the keys, restart the TuneCamp server. Check the startup logs to make sure the services (Telegram, GDrive) are initialized correctly without authentication errors.