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

# Custom Templates

> Upload and use your own PowerPoint template designs via API

## Overview

Custom templates allow you to use your own PowerPoint template designs when generating presentations. Upload your branded template once, then use it across unlimited presentations.

## How It Works

1. **Upload** your PowerPoint template (.pptx)
2. **Get** a unique template ID
3. **Generate** presentations using your template ID
4. Your presentations will automatically use your custom design

## Quick Start

<Steps>
  <Step title="Upload Your Template">
    Upload your branded PowerPoint file on SlidesGPT:

    <Card title="Upload" icon="upload" href="https://slidesgpt.com/templates">
      Upload Custom Template
    </Card>
  </Step>

  <Step title="Generate with Custom Template">
    Use the template ID from step 1:

    ```bash theme={null}
    curl -X POST https://api.slidesgpt.com/v1/presentations/generate \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "prompt": "Q4 Business Review",
        "templateId": "4a8ec7b3-c043-4d15-88e3-7d63803878f4"
      }'
    ```
  </Step>

  <Step title="Download Your Branded Presentation">
    Your presentation will use your custom design, colors, fonts, and layouts!
  </Step>
</Steps>

## Requirements

* **File Format**: `.pptx` only
* **File Size**: Maximum 50MB
* **Fonts**: Use web-safe fonts or embed fonts in the file

## Best Practices

<CardGroup cols={2}>
  <Card title="Store Template IDs" icon="database">
    Save template IDs in your database and reuse them across presentations.
  </Card>

  <Card title="One Upload" icon="upload">
    Upload once, use unlimited times - no need to re-upload.
  </Card>
</CardGroup>

## Code Examples

<CodeGroup>
  ```javascript JavaScript theme={null}


  // Generate with template
  const generateResponse = await fetch(
    "https://api.slidesgpt.com/v1/presentations/generate",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        prompt: "Q4 Business Review",
        templateId: <templateId>,
      }),
    },
  );

  const presentation = await generateResponse.json();
  ```

  ```python Python theme={null}
  import requests

  # Generate with template
  generate_response = requests.post(
      'https://api.slidesgpt.com/v1/presentations/generate',
      headers=headers,
      json={
          'prompt': 'Q4 Business Review',
          'templateId': <template_id>,
      }
  )

  presentation = generate_response.json()
  ```

  ```bash cURL theme={null}

  # Generate with template
  curl -X POST https://api.slidesgpt.com/v1/presentations/generate \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{
      \"prompt\": \"Q4 Business Review\",
      \"templateId\": \"<$TEMPLATE_ID>\"
    }"
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="List Endpoint" icon="list" href="/api-reference/endpoint/list-templates">
    API reference for listing templates
  </Card>

  <Card title="Generate with Template" icon="wand-magic-sparkles" href="/api-reference/endpoint/generate">
    Generate presentations with custom templates
  </Card>

  <Card title="Support" icon="life-ring" href="https://slidesgpt.com/p/contact">
    Need help? Contact our team
  </Card>
</CardGroup>
