Public API
The Deckyard Public API lets you programmatically create, manage, and export presentations. Use it to build integrations, automate workflows, or connect Deckyard with other tools.
Quick Start
Section titled “Quick Start”1. Create an API Key
Section titled “1. Create an API Key”Go to Settings > API Keys and create a new key. Choose the scopes you need:
| Scope | Access |
|---|---|
read | List and view presentations, themes, slide types |
write | Create, update, and delete presentations |
export | Export presentations to various formats |
ai | Use AI-powered generation features |
Important: Copy your API key immediately - it won’t be shown again.
2. Make Your First Request
Section titled “2. Make Your First Request”curl https://your-instance.com/api/v1/presentations \ -H "Authorization: Bearer dk_live_your_api_key_here"3. Explore the Documentation
Section titled “3. Explore the Documentation”Interactive API documentation is available at /api/v1/docs on your Deckyard instance.
Authentication
Section titled “Authentication”All requests require an API key in the Authorization header:
Authorization: Bearer dk_live_your_api_key_hereKey Format
Section titled “Key Format”API keys use the format dk_live_ followed by a random token. The dk_live_ prefix indicates a production key.
Security
Section titled “Security”- Keys are stored securely (only the hash is saved)
- Revoke keys instantly from Settings if compromised
- Keys inherit the permissions of the user who created them
Rate Limits
Section titled “Rate Limits”Requests are subject to rate limits based on your account tier:
| Tier | Requests/min | AI calls/day | Exports/day |
|---|---|---|---|
| Free | 60 | 10 | 50 |
| Pro | 300 | 100 | 500 |
| Enterprise | 1000 | Unlimited | Unlimited |
Rate limit information is included in response headers:
X-RateLimit-Limit: 60X-RateLimit-Remaining: 45X-RateLimit-Reset: 1705344000When rate limited, you’ll receive a 429 status with a Retry-After header.
Endpoints
Section titled “Endpoints”Presentations
Section titled “Presentations”List Presentations
Section titled “List Presentations”GET /api/v1/presentationsQuery parameters:
limit(1-100, default 50) - Maximum resultsoffset(default 0) - Skip this many results
curl "https://your-instance.com/api/v1/presentations?limit=10" \ -H "Authorization: Bearer $API_KEY"Get Presentation
Section titled “Get Presentation”GET /api/v1/presentations/{id}Returns the full presentation including all slides.
Create Presentation
Section titled “Create Presentation”POST /api/v1/presentationsContent-Type: application/json
{ "title": "My Presentation", "description": "Optional description", "theme": "deckyard", "language": "en-GB"}Update Presentation
Section titled “Update Presentation”PUT /api/v1/presentations/{id}Content-Type: application/json
{ "title": "Updated Title", "slides": [...]}Delete Presentation
Section titled “Delete Presentation”DELETE /api/v1/presentations/{id}Moves the presentation to trash (soft delete).
Duplicate Presentation
Section titled “Duplicate Presentation”POST /api/v1/presentations/{id}/duplicateCreates a copy of the presentation.
Exports
Section titled “Exports”Export presentations in various formats. Requires the export scope.
JSON Export
Section titled “JSON Export”GET /api/v1/presentations/{id}/export/jsonReturns a portable JSON format that can be imported elsewhere.
HTML Export
Section titled “HTML Export”GET /api/v1/presentations/{id}/export/htmlReturns a standalone HTML file with all assets embedded.
PowerPoint Export
Section titled “PowerPoint Export”GET /api/v1/presentations/{id}/export/pptx?scale=2Query parameters:
scale(1-3, default 2) - Image quality multiplier
PDF Export
Section titled “PDF Export”GET /api/v1/presentations/{id}/export/pdfReturns print-ready HTML optimized for PDF conversion.
AI Features
Section titled “AI Features”Generate content using AI. Requires the ai scope.
List Vendors
Section titled “List Vendors”GET /api/v1/ai/vendorsReturns available AI providers and which are configured.
Generate Presentation
Section titled “Generate Presentation”POST /api/v1/ai/wizardContent-Type: application/json
{ "content": "Your raw content text here...", "vendor": "openai", "theme": "deckyard", "language": "en-GB"}Generates a complete presentation from text content.
Append Slides
Section titled “Append Slides”POST /api/v1/ai/append-slidesContent-Type: application/json
{ "presentationId": "abc123", "content": "Additional content...", "vendor": "openai"}Generates slides and appends them to an existing presentation.
Resources
Section titled “Resources”List Themes
Section titled “List Themes”GET /api/v1/themesReturns available system and custom themes.
List Slide Types
Section titled “List Slide Types”GET /api/v1/slide-typesReturns slide type definitions with field schemas.
Search Image Library
Section titled “Search Image Library”GET /api/v1/image-library?q=nature&limit=20Search the image library for assets.
Error Handling
Section titled “Error Handling”The API uses standard HTTP status codes:
| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid input |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Valid key but insufficient scope |
404 | Not Found |
429 | Rate Limited - Slow down |
500 | Server Error |
Error responses include details:
{ "error": "Validation failed", "details": "Title is required"}Examples
Section titled “Examples”Create and Export Workflow
Section titled “Create and Export Workflow”# Create a presentationRESPONSE=$(curl -s -X POST "https://your-instance.com/api/v1/presentations" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "Q4 Report", "theme": "deckyard"}')
# Extract the IDPRES_ID=$(echo $RESPONSE | jq -r '.presentation.id')
# Export as PowerPointcurl "https://your-instance.com/api/v1/presentations/$PRES_ID/export/pptx" \ -H "Authorization: Bearer $API_KEY" \ -o report.pptxGenerate Presentation from Content
Section titled “Generate Presentation from Content”curl -X POST "https://your-instance.com/api/v1/ai/wizard" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "Our company had a great Q4. Revenue grew 25% year over year...", "vendor": "openai", "theme": "deckyard" }'Python Example
Section titled “Python Example”import requests
API_KEY = "dk_live_your_key_here"BASE_URL = "https://your-instance.com/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# List presentationsresponse = requests.get(f"{BASE_URL}/presentations", headers=headers)presentations = response.json()["presentations"]
# Create a new presentationnew_pres = requests.post( f"{BASE_URL}/presentations", headers=headers, json={"title": "API Created", "theme": "deckyard"})print(new_pres.json())OpenAPI Specification
Section titled “OpenAPI Specification”The full OpenAPI 3.0 specification is available at:
GET /api/v1/openapi.yamlImport this into tools like Postman or Insomnia for automatic client generation.
Managing API Keys
Section titled “Managing API Keys”Via Settings UI
Section titled “Via Settings UI”Go to Settings > API Keys to:
- Create new keys with specific scopes
- View key usage statistics
- Revoke compromised keys
Via Internal API
Section titled “Via Internal API”If you need programmatic key management:
# List your keyscurl "https://your-instance.com/api/api-keys" \ -H "Cookie: your-session-cookie"
# Create a keycurl -X POST "https://your-instance.com/api/api-keys" \ -H "Cookie: your-session-cookie" \ -H "Content-Type: application/json" \ -d '{"name": "CI/CD Key", "scopes": ["read", "export"]}'
# Revoke a keycurl -X DELETE "https://your-instance.com/api/api-keys/{key-id}" \ -H "Cookie: your-session-cookie"
# View usagecurl "https://your-instance.com/api/api-keys/{key-id}/usage?days=30" \ -H "Cookie: your-session-cookie"