Docs
Drive it by hand, or by API.
Everything the editor and the agent do is a route you can call with a scoped key. Seven calls cover the whole loop: key, project, generate, watch, workflows, context, PDF.
1Make a key
Open Settings → API keys and create one. Choose what it may touch (decks, images, workflows, contexts…) and, if you like, bind it to one project. The secret is shown once. Send it as a bearer token, and only to /v1 routes: the unversioned routes belong to the browser and refuse keys.
curl https://api.shatterslides.ai/v1/decks \ -H "Authorization: Bearer pk_live_…"
2Pick a project
A key bound to a project always works in it. An unbound key works in your default project, or in the one you name with a header.
curl https://api.shatterslides.ai/v1/decks \ -H "Authorization: Bearer pk_live_…" \ -H "X-Workspace-ID: PROJECT_ID"
3Generate
One door makes a deck, a slide, images, copy or a page section. It answers 202 with the run it started and the stream to watch. Send an idempotency_key and a retried request returns the same run instead of starting a second one.
curl -X POST https://api.shatterslides.ai/v1/generate \
-H "Authorization: Bearer pk_live_…" \
-H "Content-Type: application/json" \
-d '{"target": "deck",
"prompt": "A 10-slide seed pitch for a climate-data startup",
"options": {"n_slides_hint": 10},
"idempotency_key": "seed-pitch-v1"}'
# → {"run_id": "…", "target": "deck", "stream": "/decks/builder/…/stream"}
# images: "target": "image", "options": {"n": 4, "aspect": "wide"}4Watch it happen
Every run streams server-sent events as it works: an outline, each placed slide, each rendered image. The stream path comes back from the call that started the run, already under /v1 when you called /v1. Reconnect with Last-Event-ID and nothing is missed.
curl -N "https://api.shatterslides.ai/v1/decks/builder/BUILD_ID/stream" -H "Authorization: Bearer pk_live_…" # image runs curl -N "https://api.shatterslides.ai/v1/image-studio/runs/RUN_ID/stream" -H "Authorization: Bearer pk_live_…" curl "https://api.shatterslides.ai/v1/image-studio/runs/RUN_ID/candidates" -H "Authorization: Bearer pk_live_…"
5Run a saved workflow
A workflow is a saved ask: its prompts, how many ways to rewrite them, which image models render, and who picks. Run it with this run's inputs as JSON, or as multipart with the JSON in a part named body and one file per input.
curl https://api.shatterslides.ai/v1/workflows -H "Authorization: Bearer pk_live_…"
curl -X POST https://api.shatterslides.ai/v1/workflows/WORKFLOW_ID/run \
-H "Authorization: Bearer pk_live_…" \
-H "Content-Type: application/json" \
-d '{"prompt": "How to answer a 200-page RFP in a week", "variants": 2}'
curl -X POST https://api.shatterslides.ai/v1/workflows/WORKFLOW_ID/run \
-H "Authorization: Bearer pk_live_…" \
-F 'body={"variants": 2}' \
-F screenshot=@login.png6Steer with context
A context holds your brand: palette, logos, reference images and rules. Attach contexts to any generation, or to a deck so everything made inside it inherits them. Name only the context to follow its latest version, or pin a version so a result can be reproduced.
"scopes": [
{"context_id": "BRAND_CONTEXT_ID"},
{"context_id": "STYLE_CONTEXT_ID", "version_id": "VERSION_ID"}
]
curl https://api.shatterslides.ai/v1/decks/DECK_ID/contexts -H "Authorization: Bearer pk_live_…"7Get the PDF
Exports render on the server from the deck as it is right now. Ask for one, then read it until its status is done. Every read hands back a fresh signed link to the file.
curl -X POST https://api.shatterslides.ai/v1/decks/DECK_ID/exports \
-H "Authorization: Bearer pk_live_…" \
-H "Content-Type: application/json" \
-d '{"format": "pdf"}'
curl https://api.shatterslides.ai/v1/exports/EXPORT_ID -H "Authorization: Bearer pk_live_…"
# → {"status": "done", "url": "https://…", "expires_at": "…"}Errors
Every failure has the same shape, with a stable code to branch on. Never match on the message. A 429 carries Retry-After.
{"error": {"code": "scope_missing", "message": "…", "details": {}, "request_id": "…"}}- scope_missing
- The key lacks the scope this route needs. Add it to the key.
- api_key_requires_v1
- A key was sent to an unversioned route. Prefix the path with /v1.
- org_budget_exceeded
- The organisation's spend cap for the period is reached.
- validation_failed
- The body did not match the route. details names every field.