> ## Documentation Index
> Fetch the complete documentation index at: https://gigareels.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with GigaReels in under 5 minutes

# Quickstart Guide

Get your first GigaReels video generated and uploaded to social media in under 5 minutes.

> [!NOTE]
>
> **Prerequisites**: You'll need Node.js 18+ installed and a GigaReels account. [Sign up
> here](https://gigareels.com/signup) if you don't have one.

## Step 1: Install the SDK

Install the GigaReels SDK using your preferred package manager:

```bash npm theme={null}
npm install @gigareels/sdk
```

```bash yarn theme={null}
yarn add @gigareels/sdk
```

```bash pnpm theme={null}
pnpm add @gigareels/sdk
```

## Step 2: Authenticate

The easiest way to get started is with CLI authentication:

```bash theme={null}
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

> [!TIP]
>
> For production applications, you can also authenticate manually with an API key from your
> [dashboard](https://gigareels.com/dashboard/settings).

## Step 3: Generate Your First Video

Create a simple script to generate an educational brainrot video:

```javascript theme={null}
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:

```bash theme={null}
node generate-video.js
```

> [!WARNING]
>
> 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:

```javascript theme={null}
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:

> [tab] iMessage Story
>
> ```javascript theme={null}
> const task = await client.templates.brainrot.iMessage({
>   prompt: "Create a funny conversation about pizza delivery",
>   characterPack: "family-guy",
>   backgroundVideoPack: "subway-surfers"
> });
> ```

> [tab] Reddit Story
>
> ```javascript theme={null}
> const task = await client.templates.brainrot.redditStory({
>   redditPostUrl: "https://www.reddit.com/r/aww/comments/xyz/cute_puppy/",
>   characterPack: "rick-and-morty",
>   backgroundVideoPack: "minecraft-parkour"
> });
> ```

> [tab] UGC Content
>
> ```javascript theme={null}
> const task = await client.templates.ugc.hook({
>   influencerPack: "sarah_fitness",
>   audioUrl: "https://example.com/voiceover.mp3",
>   textOverlays: [
>     { text: "Try this workout!", fontSize: 48, yPosition: 100 }
>   ]
> });
> ```

> [tab] Transform Video
>
> ```javascript theme={null}
> const task = await client.templates.transform({
>   videoUrl: "https://example.com/original.mp4",
>   enableDistortionBar: true,
>   audioPitchDistortion: 0.2
> });
> ```

## What's Next?

> [card] [📖 Explore All Render Types](https://gigareels.mintlify.site/render-types/overview.md)
>
> Learn about all available content types and customization options

> [card] [🔌 Social Media Integration](https://gigareels.mintlify.site/social-media/overview.md)
>
> Deep dive into social media automation and scheduling

> [card] [🛠️ SDK Reference](https://gigareels.mintlify.site/sdk/getting-started)
>
> Comprehensive SDK documentation with all methods and options

> [card] [🎯 Examples Gallery](https://gigareels.mintlify.site/examples/basic-render.md)
>
> See real-world examples and implementation patterns

## Troubleshooting

> [accordion] CLI login not working
>
> Make sure you have Node.js 18+ installed and try:
>
> ```bash theme={null}
> npx @gigareels/sdk logout
> npx @gigareels/sdk login --local  # for development
> ```

> [accordion] Video generation taking too long
>
> Video generation typically takes 2-5 minutes. You can use webhooks for async processing:
>
> ```javascript theme={null}
> const task = await client.templates.brainrot.educational({
>   prompt: "Your content",
>   characterPack: "rick-and-morty",
>   backgroundVideoPack: "minecraft-parkour",
>   webhookUrl: "https://your-webhook.com/callback"
> });
> ```

> [accordion] Social media connection failed
>
> Ensure you've completed the account connection flow and that your user ID matches your authenticated account. Check connection status:
>
> ```javascript theme={null}
> const stats = await client.socialMedia.getUsageStats();
> console.log("Connected accounts:", stats);
> ```

> [!NOTE]
>
> Need help? Join our [Discord community](https://discord.gg/gigareels) or contact
> [albert@gigareels.com](mailto:albert@gigareels.com).

&#x20;


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.