# Pixfaro > Every image model behind one API and one MCP: your agent asks for an image; Pixfaro holds the provider accounts, keys, retries and format differences, and bills one prepaid balance. ## Docs - REST API: https://docs.pixfaro.com/api - Card templates: https://docs.pixfaro.com/templates - MCP: https://docs.pixfaro.com/mcp ## Endpoints - API base: https://api.pixfaro.com - MCP: https://mcp.pixfaro.com/mcp (streamable HTTP, OAuth 2.1 — for claude.ai / Claude Desktop connectors) - Local MCP (stdio): npx -y @pixfaro/mcp with env PIXFARO_KEY=pf_live_… (Claude Code, Cursor, Windsurf) ## Auth - API keys (pf_live_…) come from the dashboard at https://pixfaro.com; Authorization: Bearer pf_live_… - Scopes: generate (default; image endpoints only) and full (adds balance, billing, logos, brand-kit) - New accounts get $1 free credit on email verification (instant for Google/GitHub signups); balance is prepaid via Stripe top-ups (no subscription) - Generation requires a verified email (403 email_unverified before that) ## Capabilities - POST /v1/images/generations {model, prompt, aspect_ratio?, resolution?, overlay?} -> 200 {id: img_…, url, cost, balance_after} for sync models, or 202 {job_id, status, poll, eta_s} for async models (mode in GET /v1/models; a 202 is a success) — one image per request, hosted URL (never base64); optional mode: auto|sync|async - GET /v1/jobs/:id -> queued|running {job_id,status,eta_s} | succeeded = the 200 body without balance_after | failed {error, charged:false} (auto-refunded); jobs kept 24h, images stay in history; max 10 in flight - GET /v1/key -> {key:{name,prefix,last4,scope}, email_verified, balance? (full scope)} — verify a key, any scope, free - POST /v1/images/edits {model, image: img_…, instruction} -> same shape; omitted aspect_ratio keeps the source's shape; omitted resolution inherits (and bills at) the source's tier - GET /v1/models (public) -> [{id, best_for, p50_ms, price, prices per resolution tier, aspect_ratios, max_prompt_chars, mode: sync|async, enabled}] — pick by best_for; enabled:false = coming soon - GET /v1/balance -> {balance} (USD decimal string; needs scope full) - Overlay branding: "overlay":"default" applies the account's saved brand kit (PUT /v1/brand-kit); or explicit {text|logo_id, position, opacity…}; logos via POST /v1/logos (transparent PNG ≤1MB) - Failed generations are never charged (502 body says "charged": false); 402 insufficient_balance includes balance, needed, topup_url - POST /v1/renders {template, slots, size?, style?, scale?, overlay?} -> {id: img_…, url, kind: "render", template, style, cost} — TYPESET cards (quote-card, post-card), flat $0.020, ~2s, sharp type; a render is a generation (same history, same refund rules) - GET /v1/templates (public) -> [{id, tier, price, sizes, slots:[{name,type,required,max}], styles:{palettes,fonts,layouts,shadow}}] — build a form from this - Card slots: text is rejected past its max (never truncated); image slots take ONLY ast_… ids, your own /i/ URLs, data URIs <=2MB, or "default" (brand identity) — arbitrary URLs are refused - style: omit for the default, "auto" (random, avoids your last combo on that template), "brand" (your saved palette), or {palette,font,layout,shadow} - POST /v1/assets {kind: avatar|logo|photo|image, data} -> {id: ast_…} (scope full; PNG/JPEG <=5MB); PUT /v1/brand-kit/identity {name,handle,avatar_asset_id,palette} powers "default" slots - MCP tools: generate_image, edit_image, render_template, upload_asset, list_models, list_templates, get_balance — replies carry the hosted URL + cost + remaining balance - CLI: npx pixfaro gen "prompt" -a 16:9 -o cover.png ; npx pixfaro models ; npx pixfaro balance ; npx pixfaro edit img_… "instruction" ## Limits - Fair-use limits on auth/abuse endpoints (429 rate_limited); no fixed per-key cap; prompts ≤4000 chars; money always USD decimal strings ## Quickstart - MCP: claude mcp add pixfaro -e PIXFARO_KEY=pf_live_… -- npx -y @pixfaro/mcp ; then ask the agent for an image - Remote MCP: add https://mcp.pixfaro.com/mcp as a custom connector; OAuth signs you in - REST: get a key at https://pixfaro.com -> POST /v1/images/generations with Authorization: Bearer -> url in the response