MagicSlides API Documentation

Welcome to the MagicSlides API documentation. Our API allows you to integrate AI-powered presentation generation into your applications. All API endpoints require authentication using your MagicSlides Access ID.

Authentication

All API requests require an accessId parameter in the request body. This ID is unique to your account and should be kept secure.

API Endpoints

Topic to PPT

Generate a presentation from a topic with optional extra information.

POST

Endpoint URL

https://magicslides-tools-api.onrender.com/public/api/ppt_from_topic

Parameters

Parameter
Description
topic
The main topic for the presentation
extraInfoSource
Additional information to guide the presentation generation
email
Your email address
accessId
Your MagicSlides API access ID
slideCount
Optional: Number of slides to generate

Example Usage

TypeScript/JavaScript
import axios from 'axios';

const generateFromTopic = async () => {
  try {
    const response = await axios.post(
      'https://magicslides-tools-api.onrender.com/public/api/ppt_from_topic',
      {
        topic: 'Artificial Intelligence in Healthcare',
        extraInfoSource: 'Focus on recent developments and future prospects',
        email: 'your-email@example.com',
        accessId: 'your-access-id'
      }
    );
    
    console.log('Presentation URL:', response.data.url);
  } catch (error) {
    console.error('Error:', error);
  }
};
Python
import requests

def generate_from_topic():
    try:
        response = requests.post(
            'https://magicslides-tools-api.onrender.com/public/api/ppt_from_topic',
            json={
                'topic': 'Artificial Intelligence in Healthcare',
                'extraInfoSource': 'Focus on recent developments and future prospects',
                'email': 'your-email@example.com',
                'accessId': 'your-access-id'
            }
        )
        response.raise_for_status()
        print('Presentation URL:', response.json()['url'])
    except requests.exceptions.RequestException as e:
        print('Error:', e)
cURL
curl -X POST \
  'https://magicslides-tools-api.onrender.com/public/api/ppt_from_topic' \
  -H 'Content-Type: application/json' \
  -d '{
    "topic": "Artificial Intelligence in Healthcare",
    "extraInfoSource": "Focus on recent developments and future prospects",
    "email": "your-email@example.com",
    "accessId": "your-access-id"
  }'

Summary to PPT

Generate a presentation from a text summary.

POST

Endpoint URL

https://magicslides-tools-api.onrender.com/public/api/ppt_from_summery

Parameters

Parameter
Description
msSummaryText
The summary text to convert into a presentation
email
Your email address
accessId
Your MagicSlides API access ID
slideCount
Optional: Number of slides to generate

Example Usage

TypeScript/JavaScript
import axios from 'axios';

const generateFromSummary = async () => {
  try {
    const response = await axios.post(
      'https://magicslides-tools-api.onrender.com/public/api/ppt_from_summery',
      {
        msSummaryText: 'Your detailed summary text here...',
        email: 'your-email@example.com',
        accessId: 'your-access-id'
      }
    );
    
    console.log('Presentation URL:', response.data.url);
  } catch (error) {
    console.error('Error:', error);
  }
};
Python
import requests

def generate_from_summary():
    try:
        response = requests.post(
            'https://magicslides-tools-api.onrender.com/public/api/ppt_from_summery',
            json={
                'msSummaryText': 'Your detailed summary text here...',
                'email': 'your-email@example.com',
                'accessId': 'your-access-id'
            }
        )
        response.raise_for_status()
        print('Presentation URL:', response.json()['url'])
    except requests.exceptions.RequestException as e:
        print('Error:', e)
cURL
curl -X POST \
  'https://magicslides-tools-api.onrender.com/public/api/ppt_from_summery' \
  -H 'Content-Type: application/json' \
  -d '{
    "msSummaryText": "Your detailed summary text here...",
    "email": "your-email@example.com",
    "accessId": "your-access-id"
  }'

YouTube to PPT

Generate a presentation from a YouTube video.

POST

Endpoint URL

https://magicslides-tools-api.onrender.com/public/api/ppt_from_youtube

Parameters

Parameter
Description
youtubeURL
The YouTube video URL
email
Your email address
accessId
Your MagicSlides API access ID
slideCount
Optional: Number of slides to generate

Example Usage

TypeScript/JavaScript
import axios from 'axios';

const generateFromYouTube = async () => {
  try {
    const response = await axios.post(
      'https://magicslides-tools-api.onrender.com/public/api/ppt_from_youtube',
      {
        youtubeURL: 'https://www.youtube.com/watch?v=example',
        email: 'your-email@example.com',
        accessId: 'your-access-id'
      }
    );
    
    console.log('Presentation URL:', response.data.url);
  } catch (error) {
    console.error('Error:', error);
  }
};
Python
import requests

def generate_from_youtube():
    try:
        response = requests.post(
            'https://magicslides-tools-api.onrender.com/public/api/ppt_from_youtube',
            json={
                'youtubeURL': 'https://www.youtube.com/watch?v=example',
                'email': 'your-email@example.com',
                'accessId': 'your-access-id'
            }
        )
        response.raise_for_status()
        print('Presentation URL:', response.json()['url'])
    except requests.exceptions.RequestException as e:
        print('Error:', e)
cURL
curl -X POST \
  'https://magicslides-tools-api.onrender.com/public/api/ppt_from_youtube' \
  -H 'Content-Type: application/json' \
  -d '{
    "youtubeURL": "https://www.youtube.com/watch?v=example",
    "email": "your-email@example.com",
    "accessId": "your-access-id"
  }'

Response Format

All API endpoints return a JSON response with the following structure:

{
  "success": true,
  "url": "https://example.com/path/to/presentation.pptx",
  "message": "Presentation generated successfully"
}

Error Handling

In case of an error, the API will return a JSON response with an error message:

{
  "success": false,
  "error": "Invalid access ID provided",
  "code": "AUTH_ERROR"
}

Rate Limits

The API is rate-limited to ensure fair usage. Please contact support for details about rate limits for your account.