# LLM Resources (/docs/llm-resources) ## Overview [#overview] These resources provide machine-readable versions of our documentation, optimized for Large Language Models (LLMs) and AI tools to efficiently process and understand the SlidesGPT API. ## Available Formats [#available-formats] **llms.txt** - Structured index of all documentation pages with descriptions **llms-full.txt** - Complete documentation content in a single file ## What are these files? [#what-are-these-files] ### llms.txt [#llmstxt] The `llms.txt` file is an industry standard that helps LLMs index content more efficiently, similar to how a sitemap helps search engines. It contains: * Site title as an H1 heading * Structured content sections with links * Description of each page from frontmatter ### llms-full.txt [#llms-fulltxt] The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools. It provides: * Complete documentation content in one place * Full context for comprehensive answers * Cross-references between different sections * Preserved structure and formatting ## Benefits [#benefits] LLMs can quickly locate and process relevant content Structured format improves comprehension and response quality Automatically regenerated whenever documentation changes No manual updates required - generated directly from the docs content ## How AI Tools Use These Files [#how-ai-tools-use-these-files] 1. **Discovery**: AI tools automatically find these files at standard URLs 2. **Indexing**: Content is processed and indexed for efficient retrieval 3. **Context Building**: Full documentation provides comprehensive understanding 4. **Query Processing**: Structured format enables accurate responses ## For Developers [#for-developers] If you're building AI-powered tools that need to understand the SlidesGPT API: * Use `/docs/llms.txt` for quick navigation and page discovery * Use `/docs/llms-full.txt` for complete context and detailed information * Append `.md` to any docs page URL to get its raw markdown * Both files follow the industry-standard llms.txt specification These files are generated automatically and are always in sync with the latest documentation. # Authentication (/docs/getting-started/authentication) To use the **SlidesGPT API**, you need an API key for authentication. This key must be included in every request as a Bearer token in the `Authorization` header. ### How to Get an API Key [#how-to-get-an-api-key] Sign up or log in to [SlidesGPT](https://slidesgpt.com). Navigate to the [API Keys](https://slidesgpt.com/keys) page. Authentication 1 Generate a new API key. Authentication 2 Optionally, give your key a name. Authentication 3 Save your key. Authentication 4 ### Using the API Key [#using-the-api-key] Include it in your request headers: ``` Authorization: Bearer YOUR_API_KEY ``` Keep your key secure and do not share it. # Custom Templates (/docs/getting-started/custom-templates) ## Overview [#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 [#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 [#quick-start] ### Upload Your Template [#upload-your-template] Upload your branded PowerPoint file on SlidesGPT: Upload Custom Template ### Generate with Custom Template [#generate-with-custom-template] Use the template ID from step 1: ```bash 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" }' ``` ### Download Your Branded Presentation [#download-your-branded-presentation] Your presentation will use your custom design, colors, fonts, and layouts! ## Requirements [#requirements] * **File Format**: `.pptx` only * **File Size**: Maximum 50MB * **Fonts**: Use web-safe fonts or embed fonts in the file ## Best Practices [#best-practices] Save template IDs in your database and reuse them across presentations. Upload once, use unlimited times - no need to re-upload. ## Code Examples [#code-examples] ```javascript // 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 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 # 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\" }" ``` ## Next Steps [#next-steps] API reference for listing templates Generate presentations with custom templates Need help? Contact our team # Deleting a Presentation (/docs/getting-started/delete-presentation) The **SlidesGPT API** allows you to delete a generated presentation permanently. Once deleted, the presentation cannot be recovered. ### Request Example [#request-example] Send a `DELETE` request to: ``` https://api.slidesgpt.com/v1/presentations/{id} ``` #### Sample Code (cURL) [#sample-code-curl] ```sh curl -X DELETE "https://api.slidesgpt.com/v1/presentations/12345" \ -H "Authorization: Bearer YOUR_API_KEY" ``` #### Sample Code (JavaScript) [#sample-code-javascript] ```js async function deletePresentation(id) { try { const response = await fetch(`${API_BASE_URL}/presentations/${id}`, { method: "DELETE", headers: { Authorization: `Bearer ${token}` }, }); if (response.ok) console.log("Presentation deleted successfully."); else console.error("Failed to delete presentation."); } catch (err) { console.error(err); } } ``` You must include your API key in the `Authorization` header. If you don't have one, follow the steps in the [Authentication Guide](/getting-started/authentication) to get your API key. Use this API call carefully, as deletions are **irreversible**. # Downloading a Presentation (/docs/getting-started/download-presentation) The **SlidesGPT API** allows you to download a generated presentation as a PowerPoint (`.pptx`) file. ### Request Example [#request-example] Send a `GET` request to: ``` https://api.slidesgpt.com/v1/presentations/{id}/download ``` #### Sample Code (JavaScript) [#sample-code-javascript] ```js import fs from "fs"; async function downloadPresentation(id) { try { const response = await fetch(`${API_BASE_URL}/presentations/${id}/download`, { method: "GET", headers: { Authorization: `Bearer ${token}` }, }); const buffer = await response.arrayBuffer(); fs.writeFileSync(`presentation-${id}.pptx`, Buffer.from(buffer)); } catch (err) { console.error(err); } } ``` This function fetches the `.pptx` file and saves it locally. #### Sample Code (wget) [#sample-code-wget] ```sh wget --header="Authorization: Bearer YOUR_API_KEY" \ -O presentation.pptx \ "https://api.slidesgpt.com/v1/presentations/12345/download" ``` You must include your API key in the `Authorization` header. If you don't have one, follow the steps in the [Authentication Guide](/getting-started/authentication) to get your API key. # Embedding a Presentation (/docs/getting-started/embed-presentation) The **SlidesGPT API** provides an easy way to embed presentations using Microsoft PowerPoint Online. The `embed` route returns a **redirect response** to the PowerPoint Online viewer. ### Request Example [#request-example] Send a `GET` request to: ``` https://api.slidesgpt.com/v1/presentations/{id}/embed ``` #### Sample Code (cURL) [#sample-code-curl] ```sh curl -X GET "https://api.slidesgpt.com/v1/presentations/12345/embed" \ -H "Authorization: Bearer YOUR_API_KEY" ``` You must include your API key in the `Authorization` header. If you don't have one, follow the steps in the [Authentication Guide](/getting-started/authentication) to get your API key. ### Behavior [#behavior] This request **does not return JSON**. Instead, it redirects the user to PowerPoint Online, where the presentation can be viewed. You can directly use this endpoint in an `