Generate admin token:
node generate-token.jscurl -X POST http://localhost:3000/admin/accounts \
-H "x-admin-token: YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Test User"}'Response:
{
"id": "uuid",
"name": "Test User",
"token": "account-token-uuid",
"created_at": "2025-10-30T..."
}curl http://localhost:3000/admin/accounts \
-H "x-admin-token: YOUR_ADMIN_TOKEN"curl http://localhost:3000/admin/accounts/{id} \
-H "x-admin-token: YOUR_ADMIN_TOKEN"curl -X PUT http://localhost:3000/admin/accounts/{id} \
-H "x-admin-token: YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "New Name"}'curl -X DELETE http://localhost:3000/admin/accounts/{id} \
-H "x-admin-token: YOUR_ADMIN_TOKEN"Save your account token from account creation response.
curl http://localhost:3000/me \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl -X POST http://localhost:3000/channels/search \
-H "x-account-token: YOUR_ACCOUNT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"q": "kurzgesagt"}'curl http://localhost:3000/channels/UC_CHANNEL_ID \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl "http://localhost:3000/channels/UC_CHANNEL_ID/videos?page=1&page_size=40" \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl -X POST http://localhost:3000/subscriptions \
-H "x-account-token: YOUR_ACCOUNT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"yt_channel_id": "UC_CHANNEL_ID"}'curl http://localhost:3000/subscriptions \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl -X DELETE http://localhost:3000/subscriptions/{subscription_id} \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl http://localhost:3000/videos/VIDEO_ID \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl http://localhost:3000/videos/VIDEO_ID/stream \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"With custom quality:
curl "http://localhost:3000/videos/VIDEO_ID/stream?quality=1080p" \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl http://localhost:3000/settings \
-H "x-account-token: YOUR_ACCOUNT_TOKEN"curl -X PUT http://localhost:3000/settings/DEFAULT_QUALITY \
-H "x-account-token: YOUR_ACCOUNT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": "1080p"}'curl -X PUT http://localhost:3000/settings/PAGE_SIZE \
-H "x-account-token: YOUR_ACCOUNT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": 50}'curl http://localhost:3000/healthResponse:
{
"status": "ok",
"db": "ok",
"cache": "ok"
}