Kompyl API Documentation
Transform any content into structured presentations, courses, and documents. Our REST API makes it easy to integrate AI-powered content transformation into your workflows.
Authentication
All API requests require an API key passed via the X-API-Key header.
curl -X POST https://api.kompyl.com/v1/compile-and-render \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"input": {"type": "text", "value": "Your content..."}}'API Key Scopes
parse— Parse content into Brain DSLvalidate— Validate and auto-fix Brainplan— Generate layout plansrender— Render final artifacts
Rate Limits
- Free tier: 10 requests/min
- Pro tier: 100 requests/min
- Enterprise: Custom limits
Quick Start
The /compile-and-render endpoint is the fastest way to transform content. It handles parsing, validation, planning, and rendering in a single call.
curl -X POST https://api.kompyl.com/v1/compile-and-render \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "text",
"value": "# Introduction to AI\n\nArtificial intelligence is transforming..."
},
"format": "pptx",
"language": "en",
"audience": "intermediate"
}'import requests
response = requests.post(
"https://api.kompyl.com/v1/compile-and-render",
headers={"X-API-Key": "your_api_key"},
json={
"input": {
"type": "text",
"value": "# Introduction to AI\n\nArtificial intelligence..."
},
"format": "pptx",
"language": "en",
"audience": "intermediate"
}
)
result = response.json()
print(f"Download: {result['download_url']}")const response = await fetch('https://api.kompyl.com/v1/compile-and-render', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
input: {
type: 'text',
value: '# Introduction to AI\n\nArtificial intelligence...'
},
format: 'pptx',
language: 'en',
audience: 'intermediate'
})
});
const result = await response.json();
console.log('Download:', result.download_url);{
"job_id": "job_abc123",
"status": "succeeded",
"artifact_id": "art_xyz789",
"download_url": "/v1/artifacts/art_xyz789/download",
"block_count": 8,
"slide_count": 10,
"dsl_version": "1.0",
"warnings": [],
"fixes_applied": []
}API Endpoints
Base URL: https://api.kompyl.com/v1 (production) or your self-hosted deployment URL
Compile
One-call content transformation
/compile-and-renderCompile and render content in one call. Creates job, parses, validates, plans, and renders.Jobs
Fine-grained pipeline control for advanced workflows
/jobsCreate a new job with input content/jobs/{job_id}Get job status, progress, and results/jobs/{job_id}/parseParse input into Brain DSL/jobs/{job_id}/validateValidate Brain with optional auto-fix/jobs/{job_id}/planGenerate layout plan from Brain/jobs/{job_id}/renderRender final artifact (PPTX, PDF, etc.)/jobs/{job_id}/qaGet QA report with L&D validationArtifacts
Download generated files
/artifacts/{artifact_id}Get artifact metadata/artifacts/{artifact_id}/downloadDownload artifact fileProjects
Version control for content iterations
/projectsCreate a new project/projectsList all projects/projects/{project_id}Get project details with version counts/projects/{project_id}/sourcesAdd a new source version/projects/{project_id}/versionsList all versions (source, brain, render)/projects/{project_id}/compileCompile source into brain version/projects/{project_id}/renderRender brain into artifacts/projects/{project_id}/renders/{render_id}/approveApprove a render version/projects/{project_id}/renders/{render_id}/rejectReject a render versionTemplates
Upload and manage PPTX templates
/templatesUpload a PPTX template file/templatesList all templates/templates/{template_id}Get template details/templates/{template_id}/profileGet extracted template profile/templates/{template_id}/profileExtract/refresh template profile/templates/{template_id}/certifyRun certification testsWebhooks
Async job notifications
/webhook-endpointsCreate a webhook endpoint/webhook-endpointsList all webhook endpoints/webhook-endpoints/{endpoint_id}Get endpoint details/webhook-endpoints/{endpoint_id}Update endpoint configuration/webhook-endpoints/{endpoint_id}Delete webhook endpoint/webhook-deliveriesList delivery attempts with filtersReview Sessions
Share renders for external approval
/review-sessionsCreate a shareable review session/review/{token}Get review data (no API key needed)/review/{token}/approveApprove via token/review/{token}/rejectReject via token/review/{token}/commentsAdd comment to reviewRequest & Response Schemas
JobInput
{
type: "text" | "url" | "file",
value?: string, // For text/url
file_id?: string // For file uploads
}JobConstraints
{
max_blocks: number, // 5-100, default 30
one_idea_per_block: bool, // default false
max_words_per_block: number // 10-200, default 50
}CompileAndRenderRequest
{
input: JobInput,
preset_id?: "course" | "battlecard" | ...,
mode?: "teaching" | "executive",
language: "en" | "ar" | "auto",
audience: "beginner" | "intermediate" | "advanced",
constraints?: JobConstraints,
format: "pptx" | "pdf",
theme_id: string,
template_id?: string,
strict: boolean,
auto_fix: boolean
}CompileAndRenderResponse
{
job_id: string,
status: "queued" | "succeeded" | "failed",
artifact_id: string,
download_url: string,
block_count: number,
slide_count: number,
dsl_version: string,
warnings: string[],
fixes_applied: string[]
}Error Response
{
"detail": "Error message describing what went wrong",
"code": "VALIDATION_ERROR",
"field": "input.value"
}HTTP Status Codes: 200 (success), 201 (created), 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 429 (rate limited), 500 (server error)
SDKs & Resources
Try Our Free Tools
Don't need the API? Use any of our free AI tools directly in your browser — no signup or API key required.
AI Paraphrasing Tool
Reword any text while keeping the meaning intact
📄PowerPoint to PDF Converter
Convert PPTX presentations to PDF documents
📕PDF to PowerPoint Converter
Convert PDF documents to editable PowerPoint slides
✏️AI Text Rewriter
Rewrite and improve any text with AI
✏️AI Sentence Rewriter
Rewrite individual sentences for clarity and style
📋AI PDF Summarizer
Summarize any PDF document with AI instantly
❓AI Quiz Generator
Generate quizzes and assessments from any content
📈AI Infographic Generator
Turn data and text into visual infographics