Agents & API

A programmatic render API built for agents: deterministic, computable pricing, and scoped keys with bounded spend — so an agent can estimate cost and render without a human in the loop.

SVG rendering is live today (a non-raster path, billed per the credit formula); estimate and validate are live and free. Raster formats (MP4/WebM/GIF/PNG/PDF) return a worker_pending status until the raster worker ships — see status. We don't claim an uptime SLA yet.

Organizations & service accounts

Get a key

Create a service account from your dashboard: Account → Service Accounts. Pick a name, scopes, and an optional spend cap. The key (pp_sa_…) is shown once — copy it then; only a hash is stored.

Authenticate

Send the key as a bearer token:

Authorization: Bearer pp_sa_xxxxxxxxxxxxxxxx

Scopes

ScopeGrants
render:createSubmit renders & estimate cost
render:readRead render status & estimate cost
scene:validateValidate scene documents

A request without one of the required scopes is rejected with insufficient_scope. A spend cap is enforced before a render is held — once a key has charged up to its cap, further renders return 402.

Pricing is computable

Cost is deterministic, so an agent can bound it before calling:

credits = ceil(duration_s × fps_factor × resolution_factor × format_factor)
1 credit = 1s of 1080p/30 MP4 = $0.015

See the full table + calculator on the pricing page.

REST endpoints (/v1)

Endpoint
POST /v1/renders:estimatelive · free exact credit + USD cost
POST /v1/scenes:validatelive · free schema + limit diagnostics
POST /v1/rendersSVG live submit — SVG renders & bills now; raster pending
GET /v1/renders/{id}live job status
GET /v1/renders/{id}/artifactlive the rendered artifact

Estimate a render

curl -X POST https://cloud.pinepaper.studio/v1/renders:estimate \
  -H "Authorization: Bearer pp_sa_…" \
  -H "Content-Type: application/json" \
  -d '{"exportProfile":{"durationSeconds":10,"fps":30,"resolution":"1080p","format":"mp4"}}'

# → { "ok": true, "credits": 10, "priceUsd": 0.15, "breakdown": {…} }

Validate a scene

curl -X POST https://cloud.pinepaper.studio/v1/scenes:validate \
  -H "Authorization: Bearer pp_sa_…" \
  -H "Content-Type: application/json" \
  -d '{"scene":{"canvas":{"width":1920,"height":1080},"layers":[…]}}'

# → { "valid": true, "diagnostics": [], "itemCount": 12, "dimensions": {…} }

Render a scene (SVG)

curl -X POST https://cloud.pinepaper.studio/v1/renders \
  -H "Authorization: Bearer pp_sa_…" \
  -H "Content-Type: application/json" \
  -d '{"scene":{…},"exportProfile":{"resolution":"1080p","format":"svg","durationSeconds":5,"fps":30}}'

# → { "ok": true, "status": "succeeded", "credits": 2, "priceUsd": 0.03,
#     "cached": false, "statusUrl": "…/v1/renders/rnd_…",
#     "artifactUrl": "…/v1/renders/rnd_…/artifact" }
# Then GET the artifactUrl for the SVG. A raster format returns 503 worker_pending.

Errors use one diagnostic vocabulary everywhere — { code, severity, target, fix } — plus service codes INSUFFICIENT_CREDITS, LIMIT_EXCEEDED.

MCP tools

The same capabilities are exposed as MCP tools for Claude Desktop and other MCP clients via https://cloud.pinepaper.studio/mcp/v1:

Tool
pinepaper_estimatelive · free
pinepaper_validatelive · free
pinepaper_renderSVG live · raster pending
{
  "mcpServers": {
    "pinepaper-cloud": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://cloud.pinepaper.studio/mcp/v1"]
    }
  }
}

See also: pricing · status · security · general docs.