# Data Figure Studio > A browser-based composer that assembles multi-panel scientific figures to publication standard: automatic white-margin trimming, axis-line alignment across rows and columns, plot-area matching so baked-in text/tick sizes unify, and export at exact physical size (mm) as PNG (100-1200 DPI), SVG, or PDF. Images never leave the user's device in the web app. Website: https://data-figure-studio.vercel.app ## Use it as a human Open the website, drop in panel images (PNG/JPG/SVG/WebP/GIF/BMP/TIFF/PDF), and the figure is organized automatically. Free: PNG preview at 100 DPI with a light watermark. Pro: high-res figure credits — one credit exports one figure (watermark-free PNG/SVG/PDF at 300-1200 DPI). Packs: 1 figure $0.99, 4 figures $2.99, 10 figures $5.99. ## Use it as an AI agent ### MCP endpoint (recommended) POST https://data-figure-studio.vercel.app/api/mcp (JSON-RPC 2.0, MCP protocol 2024-11-05) GET the same URL for server info. Tools: - `compose_figure` — compute a publication-grade figure layout from panel dimensions. Input: panels: [{w, h, axes?}] in source pixels, optional settings {width (mm, default 180), gap, margin, font, columns (0=auto), scaling: "plot"|"uniform", alignAxes}. Output: figure width/height in mm and each panel's x/y/w/h in mm. No image data is needed or accepted. - `get_pricing` — current plans and whether payments are configured. - `create_paypal_checkout` — PayPal alternative: create a PayPal order; returns an approve_url for the human and an order_id. - `capture_paypal_purchase` — capture an approved PayPal order and receive the unlock token. ### REST API - GET /api/pricing — pricing JSON + payments_configured flag. - POST /api/compose — same layout engine as compose_figure. Body: {"panels":[{"w":800,"h":600,"axes":{"ax":70,"ay":520,"l":70,"t":85,"r":40,"b":78}}], "settings":{"width":180,"scaling":"plot"}}. An unlock token may be sent as `Authorization: Bearer `; the response reports `pro: true/false`. - POST /api/create-paypal-order — returns {"url" (approve link), "id" (order id)}. - POST /api/capture-paypal-order — body {"order_id": "..."} captures the payment and returns {"ok": true, "exp", "token"}. - OpenAPI spec: https://data-figure-studio.vercel.app/openapi.json ### Payment flow for agents (PayPal) 1. Call create_paypal_checkout (MCP) or POST /api/create-paypal-order (REST). 2. Give the returned approve_url to the human; they approve with their PayPal account. 3. Call capture_paypal_purchase with the order_id to complete the payment and receive the unlock token. 4. The token carries the purchased figure credits and unlocks Pro exports in the web app while credits remain. ### Pricing - Free: $0 — full workspace, 100 DPI watermarked PNG. - Figure credits (PayPal): 1 figure $0.99 · 4 figures $2.99 · 10 figures $5.99. One credit = one high-res figure export (PNG/SVG/PDF, any DPI, no watermark); re-exports of the same figure (identical panels + settings) are free for 24 hours. Checkout calls accept a `pack` field: "p1" | "p4" | "p10" (prices fixed server-side; default p1). The purchase returns a signed token carrying the credit count. Live price/status: GET /api/pricing. ## Notes for agents - The layout engine aligns the panels' AXIS LINES (not just image edges): panels in a column share one y-axis x-position, panels in a row share one x-axis y-position. Provide `axes` (from any axis detector) for exact alignment; without it, panels align by their content edges. - Trimming and axis detection run locally in the browser for the web app; the API needs only dimensions, so it works for pipelines that render panels themselves. - Privacy: the web app never uploads images. The API accepts dimensions/metadata only. USDC (crypto) payments, for agents with a wallet: - POST /api/create-usdc-order {chain: "solana"|"ethereum", pack} -> order with order_id, order_token, expires_at, amount_usdc. Solana orders also include solana_pay_url and a unique on-chain reference; Ethereum orders include the merchant address and the USDC contract. - Solana: POST /api/usdc-solana-tx {order_id, pack, order_token, expires_at, buyer} -> base64 unsigned transaction for the buyer to sign and submit (or pay the solana_pay_url from any Solana wallet). - POST /api/verify-usdc-order {chain, order_id, pack, order_token, expires_at, signature?|tx_hash?} -> { ok: true, credits, token, tx } once the payment is confirmed on-chain (Ethereum needs 2 confirmations), or { ok: false, pending: true } while it settles. Also exposed as MCP tools create_usdc_order, build_usdc_solana_tx, verify_usdc_order. - Prices are USD-pegged (USDC is a dollar stablecoin): p1 0.99, p4 2.99, p10 5.99.