Two Minute Toolkit TwoMinuteSWOT
Slide Deck Quality SWOT Analyses in 2 minutes or less

SWOT Analysis HTTP API

POST a small JSON description and get back a deck-ready PNG (or SVG). The endpoint is open and CORS-enabled, so it works from browsers, scripts, CI and anywhere else you can make an HTTP call. The same JSON opens in the builder.

POST https://www.twominutetoolkit.com/api/render/swot
Fair use: rate-limited to 20 requests a minute per IP (bursts capped at 5 a second), shared across every Two Minute tool, with a 64 KB body cap. No key or sign-up needed.

Try it

Open in builder

Code samples

Live preview

Click Render to call the API.

Request body

FieldTypeDescription
titlestringHeading shown top-left of the chart at 22px bold. Every chart has one title row; an empty string hides it.
max 140 chars · default "SWOT analysis"
widthintegerChart width in pixels (640–2400, default 1280, which suits a 16:9 slide). PNG output renders at 2x. Height is computed from the content.
640–2400 · default 1280
palettestring[]Hex colours. With the default palette the quadrants are emerald (S), amber (W), sky (O) and red (T); pass brand colours and they apply in order S, W, O, T instead. Default: indigo, sky, emerald, amber, red, gray.
max 12 items · default ["#4f46e5","#0ea5e9","#10b981","#f59e0b","#ef4444","#6b7280"]
subjectstringOptional subject of the analysis, e.g. "Northside Roasters, FY26", shown small and muted in the title row's right corner (or above the grid when the title is long). Omit for none.
max 80 chars
strengthsrequiredstring[]Required (may be empty []). Internal, helpful: what the subject does well or owns, e.g. ["Award-winning single-origin range", "Loyal café following"]. 0–8 short phrases of about 3–8 words; long ones wrap to 3 lines. Top-left quadrant.
max 8 items
weaknessesstring[]Internal, harmful: what holds the subject back, e.g. ["One roaster, near capacity"]. 0–8 short phrases. Top-right quadrant. Default [].
max 8 items · default []
opportunitiesstring[]External, helpful: trends or openings the subject could use, e.g. ["Offices restocking coffee after hybrid return"]. 0–8 short phrases. Bottom-left quadrant. Default [].
max 8 items · default []
threatsstring[]External, harmful: what could hurt the subject, e.g. ["Green coffee prices at a 40-year high"]. 0–8 short phrases. Bottom-right quadrant. Default [].
max 8 items · default []
labelsbooleanShow the axis labels: "Helpful" and "Harmful" over the columns, "Internal" and "External" beside the rows. Default true.
default true
conclusionstringOptional one-line takeaway shown in a muted band under the grid, e.g. "Lead with wholesale to offices; fund a second roaster first". Wraps to 2 lines. Omit for none.
max 200 chars
colorsobjectOptional colour overrides per quadrant, as hex, e.g. { "threats": "#b91c1c" }. Each colours that quadrant's stripe, letter, bullet dots and tint. Default: emerald, amber, sky and red (or the brand palette).

colors

FieldTypeDescription
strengthsstringStrengths colour, e.g. "#10b981".
max 40 chars
weaknessesstringWeaknesses colour, e.g. "#f59e0b".
max 40 chars
opportunitiesstringOpportunities colour, e.g. "#0ea5e9".
max 40 chars
threatsstringThreats colour, e.g. "#ef4444".
max 40 chars

Endpoints

  • POST /api/render/swot returns image/png; add ?format=svg for SVG.
  • GET /swot.png?d=<payload> and /swot.svg?d=<payload> render a chart from a link. The payload is the JSON body, raw-deflated and base64url-encoded. Nothing is stored: links are permanent and cached for a year.
  • /swot#d=<payload> opens the same chart in the builder for editing.
  • GET /api/render/swot?demo=1 returns the demo chart.
  • GET /api/schema/swot returns the JSON Schema, for code generators and AIs.

Errors and adjustments

Input is lenient where the intent is clear: numeric strings become numbers, out-of-range values are clamped, and unknown fields are ignored. Adjustments are listed in the X-Render-Warnings header. Anything unclear returns a 400 that says how to fix it:

{
  "error": "Invalid payload",
  "issues": [{ "path": "tasks", "message": "must be an array" }],
  "example": { … }
}

Calling from an AI assistant?

Use the hosted MCP server instead. It gives Claude, Cursor and other MCP clients a create_swot tool that returns the image plus image, SVG and edit links. See the MCP page →