Skip to main content

Quickstart Guide

Get your first GigaReels video generated and uploaded to social media in under 5 minutes.
Prerequisites: You’ll need Node.js 18+ installed and a GigaReels account. Sign up here if you don’t have one.

Step 1: Install the SDK

Install the GigaReels SDK using your preferred package manager:
npm install @gigareels/sdk

Step 2: Authenticate

The easiest way to get started is with CLI authentication:
npx @gigareels/sdk login
This will:
  1. Open your browser to authenticate with GigaReels
  2. Generate an API key for your account
  3. Store credentials locally for the SDK to use automatically
For production applications, you can also authenticate manually with an API key from your dashboard.

Step 3: Generate Your First Video

Create a simple script to generate an educational brainrot video:
import { GigaReels } from "@gigareels/sdk";

async function generateVideo() {
	// Create client (uses stored credentials from login)
	const client = new GigaReels("your-api-key");

	// Generate an educational brainrot video
	const task = await client.templates.brainrot.educational({
		prompt: "Explain the benefits of renewable energy",
		characterPack: "rick-and-morty",
		backgroundVideoPack: "minecraft-parkour",
		enableGifs: true,
	});

	console.log("✅ Video generated!");
	console.log("📹 Video URL:", task.outputUrl);

	return task;
}

generateVideo().catch(console.error);
Save this as generate-video.js and run it:
node generate-video.js
Video generation typically takes 2-5 minutes. The SDK will automatically poll for completion unless you provide a webhook URL.

Step 4: Upload to Social Media

Now let’s automatically upload the generated video to social media platforms:
import { GigaReels } from "@gigareels/sdk";

async function generateAndUpload() {
	const client = new GigaReels("your-api-key");

	// 1. Generate the video
	const videoTask = await client.templates.brainrot.educational({
		prompt: "Explain the benefits of renewable energy",
		characterPack: "rick-and-morty",
		backgroundVideoPack: "minecraft-parkour",
	});

	console.log("✅ Video generated:", videoTask.outputUrl);

	// 2. Connect social media accounts (one-time setup)
	const { access_url } = await client.socialMedia.connect();
	console.log("🔗 Visit this URL to connect your accounts:", access_url);

	// After user connects accounts, upload the video
	console.log("⏳ Please connect your accounts and press Enter to continue...");
	await new Promise(resolve => process.stdin.once("data", resolve));

	// 3. Upload to multiple platforms
	const uploadResult = await client.socialMedia.uploadToMultiplePlatforms({
		videoUrl: videoTask.outputUrl,
		title: "🌱 Amazing renewable energy facts!",
		username: "your_user_id", // Your authenticated user ID
		platforms: ["tiktok", "instagram"],
		tiktokOptions: {
			privacy_level: "PUBLIC_TO_EVERYONE",
			disable_comment: false,
		},
		instagramOptions: {
			media_type: "REELS",
			share_to_feed: true,
		},
	});

	console.log("🚀 Upload successful:", uploadResult);
}

generateAndUpload().catch(console.error);

Step 5: Explore More Templates

GigaReels offers various content templates. Try these examples:
const task = await client.templates.brainrot.iMessage({
  prompt: "Create a funny conversation about pizza delivery",
  characterPack: "family-guy",
  backgroundVideoPack: "subway-surfers"
});

What’s Next?

📖 Explore All Render Types

Learn about all available content types and customization options

🔌 Social Media Integration

Deep dive into social media automation and scheduling

🛠️ SDK Reference

Comprehensive SDK documentation with all methods and options

🎯 Examples Gallery

See real-world examples and implementation patterns

Troubleshooting

Make sure you have Node.js 18+ installed and try:
npx @gigareels/sdk logout
npx @gigareels/sdk login --local  # for development
Video generation typically takes 2-5 minutes. You can use webhooks for async processing:
const task = await client.templates.brainrot.educational({
  prompt: "Your content",
  characterPack: "rick-and-morty",
  backgroundVideoPack: "minecraft-parkour",
  webhookUrl: "https://your-webhook.com/callback"
});
Ensure you’ve completed the account connection flow and that your user ID matches your authenticated account. Check connection status:
const stats = await client.socialMedia.getUsageStats();
console.log("Connected accounts:", stats);
Need help? Join our Discord community or contact albert@gigareels.com.