Skip to content
ShapelessAI← Back
Media

Render a carousel

Turn structured slide content into a designed carousel: a PDF for LinkedIn's document post plus one PNG per slide for Instagram, each a media key.

View as Markdown

Send the slides' headlines and body lines; the layout, type and brand colors are ours to set. The PDF key goes straight into a LinkedIn post, the PNG keys into an Instagram carousel.

Ask in plain words

  • "make a five slide LinkedIn carousel from these points"
  • "carousel generator API"
  • "render these tips as an Instagram carousel"

From an agent host (MCP)

Server: https://shapelessai.com/mcp (add it to your host).

  • render_carousel: Render your own HTML and CSS slides to a PDF (a LinkedIn document post) plus one PNG per slide (an Instagram carousel), each a media key. Slides are 1080x1350 unless you pass page; self-contained HTML only, no scripts or external URLs; src="media:<key>" places a library image. A render with clipped or unreadable text is refused with a per-element audit. SPENDS CREDIT: about $0.02 of engine cost a default call, billed with the plan's margin; budgetUsd caps it (default 2, max 10) and chargedUsd says what it cost. Needs the write scope.

From code (REST)

Bearer API key with the scope each call names (auth, OpenAPI).

  • POST /api/carousels (write scope): Render a carousel to PDF plus slide PNGs (tool render_carousel). Schema on GET /api/tools.

The body

  • title string, required: Short deck title (file naming and accessibility; render it yourself if you want it visible).
  • css string, required: The deck's one shared stylesheet: palette, type scale, layout classes. Scope everything under .slide-canvas.
  • page object: The canvas every slide is drawn on, in pixels. Default 1080x1350. Pick the shape the post will live in: 1080x1350 4:5 portrait (LinkedIn documents, Instagram portrait); 1080x1080 1:1 square; 1920x1080 16:9 landscape (slides, X, YouTube thumbnails). Anything between 480 and 2560px per side works; design your type scale for the canvas you chose, not for this default.
  • slides array, required: 1-12 slides in order. Multi-slide: slide 1 is the hook read at thumbnail size; the last slide carries ONE call to action. Exactly 1 slide = a single-page infographic: the rendered PNG is the deliverable, designed to be fully read in-feed without a swipe.
  • budgetUsd number: The most this call may spend, in USD (default 2, max 10). Held while the tool runs, released after.

From a terminal (CLI)

  • shapeless tools run render_carousel --input '<json>' (tools show render_carousel prints the schema)

Example

curl -s https://shapelessai.com/api/carousels -H "Authorization: Bearer $SHAPELESS_API_KEY" -H "Content-Type: application/json" -d @carousel.json

Refusals

StatusMeaning
400The input does not match the tool's schema; the message names the field.
402Not enough credit to hold budgetUsd, or the call costs more than budgetUsd.
404No such tool on this deployment.
422The tool refused this input; nothing was charged.
502The tool failed; nothing was charged.

Where else

More in Media

Generate an image · Generate AI video · Edit a video · Record a product demo · Render a thumbnail · Turn text into speech · Make subtitle files · Call any agent tool

Every capability · Docs · /llms.txt