sandbox

Execute python-pptx code in sandbox

Run arbitrary python-pptx code in a secure sandbox and get a PPTX file + PNG preview. The code is a python-pptx script (the presentation it saves is the output), or a build(prs) function (build(prs, slide) when chrome is provided). All python-pptx helpers (add_text_box, add_box, add_icon, etc.) are available. Dangerous imports are blocked. 30-second timeout.

Use this for custom layouts, novel visualizations, or any slide that needs full layout control. $0.05 per render. ~2 seconds.

post/v1/render/code

Request

  • Base URL: https://api.slideforge.dev
  • URL: https://api.slideforge.dev/v1/render/code
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

codestring nullable

Python code defining build(prs) or build(prs, slide). Required if job_id not provided. Max 64 KB — well above any real slide; the Jev screen (A2) screens the whole thing, so an unbounded field would let a padded payload slip past a prefix screen.

job_idstring nullable

Previous render_code job ID — loads its code for patching with replacements.

theme_idstring nullable

Theme ID for chrome + colors

logo_idstring nullable

Uploaded logo (upload_asset purpose=logo): the account's logo inside the code — add_logo(slide) draws it in the theme's logo box.

chromeobject nullable

Chrome overlays: title, subtitle, footer, etc.

headlinestring nullable

Slide title (chrome-rendered; use build(prs, slide))

contextstring nullable

Subtitle line under the title (chrome-rendered)

takeawaystring nullable

Bottom takeaway band (chrome-rendered)

source_notestring nullable

Source citation in the footer zone (chrome-rendered)

notesstring nullable

Speaker notes for the presenter; never drawn on the slide. Wins over notes the code wrote.

namestring nullable

Human-readable job name

include_previewstring nullable

Embed preview inline: none, small (256px), default (768px), full. Default: none.

verifystring

Verification tier: off | lint (default — static geometry linter + composer content validators, no LLM) | lint+vlm (adds the VLM second-look, ~+8s) | full.

dry_runboolean

If true: run the verify tier and return status (validated if clean, invalid if errors) + warnings/errors with cost:0 and NO PPTX — a free pre-commit check. Fix errors, then render for real.

quality_profilestring nullable

Readiness thresholds the layout block is judged against: executive | technical (default) | appendix.

fail_on_vlmstring[] nullable

VLM finding categories that BLOCK (escalate to errors, render free per usable-or-free): substring match on the finding, e.g. ['contrast', 'clipping']. A high-confidence overlap and any content_missing already block by default. Requires verify=lint+vlm.

contentobject nullable

Typed business facts (ADR 2026-07-14): available read-only as CONTENT inside the code; the renderer verifies every leaf rendered verbatim and emits fidelity + provenance. Keys named 'id' are references, not display content.

code_profilestring nullable

widgets_only = compose via add_widget + approved helpers + CONTENT/theme only; raw python-pptx (slide.shapes.*, add_text_box/add_box, add_slide) is rejected. Omit or 'native' for full access. Response echoes code_profile.applied + violations.

Response

Render complete with signed URLs

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.