Skip to main content
Quickstart

Your first deck from the API

Get a key, send one request, download a .pptx. The samples below run as written, and the Run button makes the same call from this page.

Validating a deck is free. Generating one is metered per slide from your wallet, and every account gets 50 free slides a month, so your first decks cost nothing. See pricing for the rates.

Get an API key

Checking your account...

Optional. Fills the samples and enables Run. It stays in this tab and is not saved. The only place it is sent is api.pptx.dev, when you press Run.

Make your first call

One request turns a small OPF deck into a .pptx file. The samples are the same call in four ways; the TypeScript one uses plain fetch, because no SDK is published yet.

bash
curl -sS -w "HTTP %{http_code}\n" -X POST https://api.pptx.dev/v1/generate \
  -H "Authorization: Bearer ak_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "$schema": "https://openpresentation.org/schema/opf/v1",
  "name": "Hello pptx.dev",
  "filename": "hello-pptx-dev",
  "slides": [
    { "title": "Hello, pptx.dev", "text": "My first deck, from one API call." },
    { "title": "What you get", "blocks": [{ "text": "A real .pptx file" }, { "text": "Checked against the OPF schema" }, { "text": "Ready to open in PowerPoint" }] }
  ]
}' \
  -o hello-pptx-dev.pptx

Sends this request from your browser to api.pptx.dev with your key.

See the result

Press Run on the curl or TypeScript sample. The deck appears here, with a download link.

What to know

  • Browsers can call the API directly: it answers CORS preflights and allows any origin, and it never accepts your session cookie from another site. Keep real keys out of public client code.
  • A 401 means the key was not accepted, a 402 means the wallet cannot cover the deck (nothing is billed), and a 429 means slow down. The full list is in the error codes.
  • PDF, PNG and SVG output from the hosted API is not available yet. Author and Inspector export them in your browser.

Next steps