plagio.devdocs

For the complete documentation index, see llms.txt.

REST API

Call plagio's captures over plain HTTP with an API key: endpoints, authentication, Markdown output, async jobs and quota headers.

The same engine as the MCP server, for scripts and products. Get your key from Dashboard, Settings; it is shown once.

Endpoints

Base URL: https://plagio.dev/v1

OpenAPI: plagio.dev/openapi.json

MethodPathBody
POST/component{ url, describe | selector, stack, viewport, fidelity, motion }
POST/page{ url, stack, viewport }
POST/brand{ url, pages, paths, darkMode, format }
POST/motion{ url, describe | selector }
GET/usage
GET/jobs/{id}

viewport is an object such as { "width": 1280, "height": 900 }.

First call

capture a component
curl https://plagio.dev/v1/component \
  -H "x-api-key: $PLAGIO_KEY" \
  -H 'content-type: application/json' \
  -d '{"url":"https://linear.app/pricing","describe":"pricing card","stack":"react-tailwind"}'

From the terminal

The plagio CLI wraps these endpoints and logs in with your browser, so there is no key to copy:

npm install -g plagio
plagio login
plagio component https://linear.app/pricing --describe "pricing card"

Where there is no browser, such as CI, set PLAGIO_API_KEY.

JSON or Markdown

Answers are JSON by default. Send Accept: text/markdown to get the same result written for an agent, which is what the MCP server returns.

Long work

A five-page brand read can outlast an HTTP timeout. Add "async": true, or a "webhook" URL, and the call answers 202 with a job id. Poll GET /v1/jobs/{id}, or wait for a POST to your webhook with x-plagio-event: job.done.

Quota headers

Every answer carries your quota, so you never have to ask for it:

HeaderMeaning
x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-resetCalls per minute
x-units-limit, x-units-used, x-units-remainingThe month's credits
x-credits-topupBought credits left
x-units-chargedWhat this call cost
x-cache, x-cache-ageHIT, MISS or REVALIDATED, and the age of a hit

Costs and limits are on Credits and limits.

On this page