# API-Playground

Turn prompts into structured outputs with Presenton’s API.

## What the API Playground is

### Iterate
Refine prompts, slide instructions, and export settings until the generated presentations match your expectations.

### Verify
Ensure content maps consistently to slide layouts and presentations render reliably before production use.

### Copy
Copy the exact playground configuration for the current iteration as JavaScript, Python, or cURL and use it directly in production.

## How it works

Create a reusable template from your presentation in just a few minutes.

### CHOOSE A MODE
- Standard for strict layouts  
- Smart for dynamic design

### ADD INPUT
- Prompt / paste content /  
- Upload files

### TUNE OUTPUT
- Tone, verbosity, language,  
- Image type, export format

### GENERATE/ COPY CODE
See results instantly in the playground.

### Drop in a prompt or paste raw content.
Generate outlines, create slide content, and format complete decks using Standard or Smart mode.

- Generate an outline
- Write slide content
- Format it into a coherent deck

### In Smart Mode, you upload a PPTX as design reference.
Uses AI to learn the design system (visual language, spacing, typography, component patterns)

- You already know exactly what each slide should contain
- You want deterministic structure for certain slides (executive summary, KPIs, etc)
- You want to mix “AI-generated” and “user-specified” slides in one deck

## Built for real decks, not demos

### Design-aware generation
Generate slides that respect layout rules and design consistency—built for professional decks and reporting.

### File-to-presentation
Upload PDFs, documents, spreadsheets, and text files as source material. Presenton extracts structure and turns it into slides.

### Examples included
Start from ready-made examples (marketing reports, research decks, sales modifications) and learn the best input patterns quickly.

### Export control
Choose export format and generation settings to match your workflow—fast experimentation without code changes.

### Code you can copy
Every successful run is instantly reproducible via API/SDK code so your prototype can become production integration.

## Frequently asked questions

### What can I build with the Presenton API?
Automate slide generation for reports, pitch decks, briefs, and dashboards. Use text prompts, Markdown, or structured JSON to create branded decks at scale and export to PPTX or PDF.

### How do I authenticate API requests?
Use Bearer authentication with an API key. Keep keys secret and scoped. Rotate keys regularly and prefer server‑side calls for sensitive operations.

### What integration patterns are supported?
Call the REST API directly from your services, trigger flows from workflow tools (e.g., Zapier, n8n), or schedule batch jobs. Many teams combine webhooks with background workers for reliable, async processing.

### Can I generate slides from Markdown?
Yes. Send your Markdown to the markdown endpoint to render slides with headings, lists, images, and code blocks mapped to appropriate layouts.

### What about JSON‑based generation and editing?
Use JSON to precisely control structure, content, and styling, or to update existing decks programmatically. This is best for deterministic results and repeatable workflows.

### How do I control branding and templates via API?
Reference your approved templates or themes in requests. You can lock fonts, colors, and layouts so every generated deck is on‑brand by default.

### Are jobs synchronous or asynchronous?
Both. Small requests can be synchronous; large jobs are typically asynchronous. Poll with a job ID or receive a webhook callback when ready to download outputs.

### What are the rate limits and best practices?
Rate limits protect stability. Use retries with exponential backoff, idempotency keys for safe retries, and queue long‑running jobs. Batch requests during off‑peak hours when possible.
