2slides ppt generator

From sinhoneyy/master-skills · View interactive version

2slides ppt generator is an AI agent skill from the GitHub repository sinhoneyy/master-skills. AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use for any \"make slides\", \"create a deck\", or \"slides from this document\" request.

How to use this skill

Skill file

2slides Presentation Generation

Overview

Generate professional presentations using the 2slides AI API. The skill supports content-based generation (theme-driven Fast PPT), style matching from a reference image, custom PDF design, document summarization, AI voice narration, and exporting pages/audio. It returns both an interactive slide URL and a downloadable PDF.

This skill is adapted from the official 2slides skill repository (CODE0). It calls the hosted 2slides API and requires the user's own API key and credits.

When to Use This Skill

Setup Requirements

Users must have a 2slides API key and credits:

  1. Get API Key: Visit https://2slides.com/api to create an account and API key
  1. Purchase Credits (Optional): Visit https://2slides.com/pricing to buy additional credits
  1. Set API Key: Store the key in environment variable: SLIDES_2SLIDES_API_KEY
export SLIDES_2SLIDES_API_KEY="your_api_key_here"

Credit Costs:

See references/pricing.md for detailed pricing information.

Workflow Decision Tree

Choose the appropriate approach based on the user's request:

User Request
│
├─ "Create slides from this content/text"
│  └─> Use Content-Based Generation (Section 1)
│
├─ "Create slides like this image"
│  └─> Use Reference Image Generation (Section 2)
│
├─ "Create custom designed slides" or "Create PDF slides"
│  └─> Use Custom PDF Generation (Section 3)
│
├─ "Create slides from this document"
│  └─> Use Document Summarization (Section 4)
│
├─ "Add voice narration" or "Generate audio for slides"
│  └─> Use Voice Narration (Section 5)
│
├─ "Download slides as images" or "Export slides and voices"
│  └─> Use Download Export (Section 6)
│
└─ "Search for themes" or "What themes are available?"
   └─> Use Theme Search (Section 7)

1. Content-Based Generation

Generate slides from user-provided text content.

When to Use

Workflow

Step 1: Prepare Content

Structure the content clearly for best results:

Title: [Main Topic]

Section 1: [Subtopic]
- Key point 1
- Key point 2
- Key point 3

Section 2: [Subtopic]
- Key point 1
- Key point 2

Step 2: Choose Theme (Required)

Search for an appropriate theme (themeId is required):

python scripts/search_themes.py --query "business"
python scripts/search_themes.py --query "professional"
python scripts/search_themes.py --query "creative"

Pick a theme ID from the results.

Step 3: Generate Slides

Use the generate_slides.py script with the theme ID:

# Basic generation (theme ID required)
python scripts/generate_slides.py --content "Your content here" --theme-id "theme123"

# In different language
python scripts/generate_slides.py --content "Your content" --theme-id "theme123" --language "Spanish"

# Async mode for longer presentations
python scripts/generate_slides.py --content "Your content" --theme-id "theme123" --mode async

Step 4: Handle Results

Sync mode response:

{
  "slideUrl": "https://2slides.com/slides/abc123",
  "pdfUrl": "https://2slides.com/slides/abc123/download",
  "status": "completed"
}

Provide both URLs to the user:

Async mode response:

{
  "jobId": "job123",
  "status": "pending"
}

Poll for results:

python scripts/get_job_status.py --job-id "job123"

2. Reference Image Generation

Generate slides that match the style of a reference image.

When to Use

Workflow

Step 1: Verify Image URL

Ensure the reference image is:

Step 2: Generate Slides

Use the generate_slides.py script with --reference-image:

python scripts/generate_slides.py \
  --content "Your presentation content" \
  --reference-image "https://example.com/template.jpg" \
  --language "Auto"

Optional parameters (all values from 2slides API):

--language LANG                 # Auto, English, Spanish, Arabic, Portuguese, Indonesian,
                                 # Japanese, Russian, Hindi, French, German, Greek, Vietnamese,
                                 # Turkish, Polish, Italian, Korean, Simplified Chinese,
                                 # Traditional Chinese, Thai (default: Auto)
--mode sync|async                # default: sync for theme, async for reference-image
--aspect-ratio RATIO             # 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 (default: 16:9)
--resolution 1K|2K|4K            # default: 2K
--page N                         # 0=auto, 1-100 (default: 1)
--content-detail concise|standard # default: standard

Note: This uses Nano Banana Pro mode with credit costs:

Step 3: Handle Results

This mode always runs synchronously and returns:

{
  "slideUrl": "https://2slides.com/workspace?jobId=...",
  "pdfUrl": "https://...pdf...",
  "status": "completed",
  "message": "Successfully generated N slides",
  "slidePageCount": N
}

Provide both URLs to the user:

Processing time: ~30 seconds per page (30-60 seconds typical for 1-2 pages)


3. Custom PDF Generation

Generate custom-designed slides from text without needing a reference image.

When to Use

Workflow

Step 1: Prepare Content

Structure the content clearly:

Title: [Main Topic]

Section 1: [Subtopic]
- Key point 1
- Key point 2

Section 2: [Subtopic]
- Key point 1
- Key point 2

Step 2: Generate Slides

Use the create_pdf_slides.py script:

Install the Python dependency first if it is not already available:

python -m pip install -r requirements.txt
# Basic generation
python scripts/create_pdf_slides.py --content "Your content here"

# With design style (API: designStyle)
python scripts/create_pdf_slides.py \
  --content "Sales Report Q4 2025" \
  --design-style "modern minimalist, blue color scheme"

# High resolution with auto page detection
python scripts/create_pdf_slides.py \
  --content "Marketing Plan" \
  --resolution 4K \
  --page 0 \
  --content-detail standard

Optional parameters:

--design-style "text"           # Design instructions (API: designStyle)
--language LANG                 # Same as generate_slides (default: Auto)
--aspect-ratio RATIO           # 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 (default: 16:9)
--resolution 1K|2K|4K          # default: 2K
--page N                        # 0=auto, 1-100 (default: 1)
--content-detail concise|standard # default: standard

Step 3: Handle Results

Returns same structure as create-like-this:

{
  "slideUrl": "https://2slides.com/workspace?jobId=...",
  "pdfUrl": "https://...pdf...",
  "status": "completed",
  "message": "Successfully generated N slides",
  "slidePageCount": N
}

Notes:


4. Document Summarization

Generate slides from document content.

When to Use

Workflow

Step 1: Read Document

Use appropriate tool to read the document content:

Step 2: Extract Key Points

Analyze the document and extract:

Step 3: Structure Content

Format extracted information into presentation structure:

Title: [Document Main Topic]

Introduction
- Context
- Purpose
- Overview

[Section 1 from document]
- Key point 1
- Key point 2
- Supporting detail

[Section 2 from document]
- Key point 1
- Key point 2
- Supporting detail

Conclusion
- Summary
- Key takeaways
- Next steps

Step 4: Generate Slides

Use content-based generation workflow (Section 1). First search for a theme, then generate:

# Search for appropriate theme
python scripts/search_themes.py --query "business"

# Generate with theme ID
python scripts/generate_slides.py --content "[Structured content from step 3]" --theme-id "theme123"

Tips:


5. Voice Narration

Add AI-generated voice narration to slides.

When to Use

Prerequisites

IMPORTANT: The slide generation job must be completed before adding narration.

  1. Generate slides first using any method (Section 1, 2, 3, or 4)
  2. Get the job ID from the generation result
  3. Ensure job status is "completed" before requesting narration

Workflow

Step 1: Choose Voice

30 voices available including:

List all voices:

python scripts/generate_narration.py --list-voices

Step 2: Generate Narration

Use the generate_narration.py script with the job ID:

# Basic narration with default voice
python scripts/generate_narration.py --job-id "abc-123-def-456"

# Single speaker, specific voice
python scripts/generate_narration.py --job-id "abc-123-def-456" --voice Aoede

# Multi-speaker mode
python scripts/generate_narration.py --job-id "abc-123-def-456" --multi-speaker

Parameters (aligned with 2slides API):

Step 3: Check Status

Narration generation runs asynchronously:

python scripts/get_job_status.py --job-id "abc-123-def-456"

Step 4: Handle Results

Once completed, the job will include narration files. Use download endpoint (Section 6) to get audio files.

Notes:


6. Download Export

Download slides as PNG images and voice narrations as WAV files.

When to Use

Workflow

Step 1: Verify Job Complete

Ensure slides (and optionally narration) are generated and job is completed.

Step 2: Download Archive

Use the download_slides_pages_voices.py script:

# Download with default filename (<job_id>.zip)
python scripts/download_slides_pages_voices.py --job-id "abc-123-def-456"

# Download to specific path
python scripts/download_slides_pages_voices.py \
  --job-id "abc-123-def-456" \
  --output "my-presentation.zip"

Step 3: Extract Contents

The ZIP archive contains:

Notes:


7. Theme Search

Find appropriate themes for presentations.

When to Use

Workflow

Search themes:

# Search for specific style (query is required)
python scripts/search_themes.py --query "business"
python scripts/search_themes.py --query "creative"
python scripts/search_themes.py --query "education"
python scripts/search_themes.py --query "professional"

# Get more results
python scripts/search_themes.py --query "modern" --limit 50

Theme selection:

  1. Show user available themes with names and descriptions
  2. Ask user to choose or let them use default
  3. Use the theme ID in generation request

Using the MCP Server

If the 2slides MCP server is configured in Claude Desktop, use the integrated tools instead of scripts.

Two Configuration Modes:

  1. Streamable HTTP Protocol (Recommended)
  1. NPM Package (stdio)

Available MCP tools:

See mcp-integration.md for complete setup instructions and detailed tool documentation.

When to use MCP vs scripts:


Advanced Features

Sync vs Async Mode

Sync Mode (default):

Async Mode:

Rate Limits

Different endpoints have different rate limits:

If rate limited, wait before retrying or check plan limits.

Credit Costs

Purchasing Credits

2slides uses a pay-as-you-go credit system with no subscriptions required.

Credit Packages: (Current promotion: up to 20% off)

New users receive 500 free credits for onboarding (~50 Fast PPT pages).

Credits never expire - use them at your own pace.

Purchase credits at: https://2slides.com/pricing

Download URL Expiration

All download URLs (PDF, ZIP archives) are valid for 1 hour only. Download files promptly after generation.

Language Support

Generate slides in multiple languages (use full language name):

--language "Auto"                # Automatic detection (default)
--language "English"             # English
--language "Simplified Chinese"  # 简体中文
--language "Traditional Chinese" # 繁體中文
--language "Spanish"             # Español
--language "French"              # Français
--language "German"              # Deutsch
--language "Japanese"            # 日本語
--language "Korean"              # 한국어

And more: Arabic, Portuguese, Indonesian, Russian, Hindi, Vietnamese, Turkish, Polish, Italian

Error Handling

Common error codes:

  1. Missing API key

```

Error: API key not found

Solution: Set SLIDES_2SLIDES_API_KEY environment variable

```

  1. RATE_LIMIT_EXCEEDED

```

Error: 429 Too Many Requests

Solution: Wait 20-30 seconds before retrying

Rate limits: Fast PPT (10/min), Nano Banana (6/min)

```

  1. INSUFFICIENT_CREDITS

```

Error: Not enough credits

Solution: Add credits at https://2slides.com/api

```

  1. INVALID_JOB_ID

```

Error: Job ID not found or invalid

Solution: Verify job ID format (must be UUID for Nano Banana)

```

  1. Invalid content

```

Error: 400 Bad Request

Solution: Verify content format and parameters

```


Script Parameter Reference (2slides API)

All scripts accept parameters that match 2slides API. Allowed values are defined in scripts/api_constants.py and enforced where applicable.

| Script | Key parameters | Allowed values (see script --help or api_constants.py) |

|--------|----------------|----------------------------------------------------------|

| generate_slides.py | --language | Auto, English, Spanish, Arabic, Portuguese, Indonesian, Japanese, Russian, Hindi, French, German, Greek, Vietnamese, Turkish, Polish, Italian, Korean, Simplified Chinese, Traditional Chinese, Thai |

| | --mode | sync, async |

| | --aspect-ratio | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |

| | --resolution | 1K, 2K, 4K |

| | --content-detail | concise, standard |

| create_pdf_slides.py | Same as above + --design-style / --design-spec (free text) | |

| generate_narration.py | --voice | 30 voices (Puck, Aoede, Charon, …); use --list-voices |

| | --language | Auto, English, Spanish, Arabic, Portuguese, Indonesian, Japanese, Russian, Hindi, French, German, Vietnamese, Turkish, Polish, Italian, Korean, Simplified Chinese, Traditional Chinese |

| | --multi-speaker | enabled when present |

| search_themes.py | --query (required), --limit (1–100) | |

| get_job_status.py | --job-id (required) | |

| download_slides_pages_voices.py | --job-id (required), --output (path) | |


Additional Documentation

API Reference

See api-reference.md for:

Pricing Information

See pricing.md for:


Tips for Best Results

Content Structure:

Theme Selection:

Reference Images:

Document Processing:


Security & Safety Notes

Limitations

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.