Minimap

API Docs

Co-Pilot API v1 — let AI assistants build designs in CollabDraw

Your API Keys

Sign in to create and manage API keys. Keys let external AI assistants (Claude, DeepSeek, custom agents) drive CollabDraw on your behalf.

API Usage

Sign in to see your API and MCP usage — request counts filterable by key and channel, plus monthly quotas for AI chats, images, code exports and QR codes.

Prefer not to write API calls?

The CollabDraw MCP server exposes these same actions to Claude, Cursor and any MCP-compatible assistant. Connect it with one URL and your existing API key — no code, no proxy.

https://collabdraw.com/api/mcp

Quick Start

  1. Create an API key under Your API Keys above (shown once — copy it immediately).
  2. Send your key as a Bearer token on every request.
  3. Call POST /chat with a prompt — the AI Agent may ask clarifying questions before building.
curl -X POST \
  https://collabdraw.com/api/v1/chat \
  -H "Authorization: Bearer cd_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Create a landing page for a coffee shop"}'

Base URL

https://collabdraw.com/api/v1

Authentication

Bearer token: Authorization: Bearer cd_live_… — 32 hex characters. Missing or invalid keys return 401 with a signup URL.

OpenAPI Spec

collabdraw.com/openapi.json

Import into Claude, ChatGPT actions, or any OpenAPI-aware client.

Endpoints

GET/projects

List projects

Returns your cloud projects, newest first, with share links and thumbnails.

Query parameters

limitintegerdefault 20— Number of projects to return (max 100).
offsetintegerdefault 0— Pagination offset.
200 OK
{
  "projects": [
    {
      "id": "a1b2c3d4-...",
      "title": "Landing Page Concept",
      "page_count": 2,
      "updated_at": "2026-11-24T09:12:00Z",
      "project_url": "https://collabdraw.com/p/xK29fmQaP1",
      "thumbnail_url": "https://.../thumb.jpg"
    }
  ]
}
POST/projects

Create a project

Creates a new project owned by the key owner. Free plans are limited to 10 projects.

Request body (JSON)

titlestring— Project title. Defaults to "Untitled Project".
template_idstring— Optional template to start from. Some templates are Pro-only.
201 Created
{
  "project": {
    "id": "a1b2c3d4-...",
    "title": "Untitled Project",
    "project_url": "https://collabdraw.com/p/xK29fmQaP1",
    "canvas": { "width": 1200, "height": 800 }
  },
  "chat_next_steps": "Send POST /api/v1/chat with project_id ..."
}
402 Limit reached
{
  "error": "Free plan limit of 10 projects reached. Upgrade to Pro for unlimited projects.",
  "upgrade_url": "https://www.collabdraw.com/pricing"
}
POST/chat

AI Co-Pilot build (core endpoint)

Sends a prompt to the CollabDraw AI Agent to create or update a layered design. The Agent either asks clarifying questions or builds the design and returns the project link.

Request body (JSON)

promptstringrequired— What to create or change (max 8000 chars).
session_iduuid— From a previous response, to continue the conversation.
project_iduuid— Existing project to edit. Omit to let the Agent create one.
image_urlurl— Optional image for the Agent to look at before building (Computer Vision).
200 needs_clarification
{
  "status": "needs_clarification",
  "session_id": "f0e1d2c3-...",
  "project_id": null,
  "questions": [
    "Who is the target audience for this landing page?",
    "What color palette and mood should it have?"
  ],
  "usage": { "tier": "free", "ai_chats_remaining": 49 }
}
200 completed
{
  "status": "completed",
  "session_id": "f0e1d2c3-...",
  "project_id": "a1b2c3d4-...",
  "project_url": "https://collabdraw.com/p/xK29fmQaP1",
  "summary": "Built a coffee shop landing page with hero, menu grid...",
  "thumbnail_url": "https://.../project-thumbnails/a1b2c3d4-.../thumb.png",
  "objects_added": 27,
  "usage": { "tier": "free", "ai_chats_remaining": 48 }
}
GET/chat/:sessionId

Poll a chat session

Returns the status of a chat session. Poll this after POST /chat when builds take longer than your client timeout.

200 OK
{
  "status": "completed",
  "session_id": "f0e1d2c3-...",
  "project_id": "a1b2c3d4-...",
  "project_url": "https://collabdraw.com/p/xK29fmQaP1",
  "thumbnail_url": "https://.../project-thumbnails/a1b2c3d4-.../thumb.png",
  "export_url": ".../projects/a1b2c3d4-.../export?format=png",
  "latest_reply": "I built the landing page with a hero section...",
  "updated_at": "2026-11-24T09:14:30Z"
}
GET/projects/:id/export

Export a project

Downloads the project's first page rendered server-side as an image or document.

Query parameters

formatstringdefault png— png, jpeg, webp, pdf, pptx, or svg.
scalenumberdefault 2— Scale factor 1-4. Free plans cap at 2; scale 4 is Pro-only.
pageinteger— 1-based page number. Defaults to the first page.
ProSVG export and 4x scale are Pro-only (402 otherwise).
200 OK
Binary file download (Content-Disposition: attachment).
402 Pro required
{
  "error": "SVG export at scale 4 requires a Pro plan.",
  "upgrade_url": "https://www.collabdraw.com/pricing"
}
POST/projects/:id/export-code

Generate website code

Runs the Frame-to-Code pipeline on the project's first frame and returns a working website.

ProUsage limits: 3 per month on Free, 20 per month on Pro.
200 OK
{
  "status": "completed",
  "export_id": "b7c8d9e0-...",
  "frame_label": "AI Generated Coffee Shop",
  "files": {
    "index.html": "<!DOCTYPE html>...",
    "styles.css": "/* ... */",
    "script.js": "// ..."
  },
  "usage": { "tier": "free", "code_exports_used": 1, "code_exports_remaining": 2 }
}
400 No frame
{ "error": "No frame found on this project's first page. Frames wrap AI-generated and template content; add one first." }
GET/usage

Read usage statistics

Returns request counts for your account — REST and MCP counted separately — plus a breakdown per API key and per endpoint, and how much of each monthly quota is left.

Query parameters

daysintegerdefault 30— Rolling window for the request counts, 1-365 days.
channelstringdefault all— all, rest, or mcp.
key_idstring— Optional API key id to scope the report to a single key.
200 OK
{
  "range": { "days": 30, "since": "2026-11-01T00:00:00Z" },
  "channel": "all",
  "requests": { "total": 128, "rest": 101, "mcp": 27 },
  "by_key": [
    { "key_id": "b7c8d9e0-...", "name": "Cursor", "key_prefix": "cd_live_a1b2", "is_active": true, "requests": 128, "mcp_requests": 27 }
  ],
  "by_endpoint": [
    { "endpoint": "POST /api/v1/chat", "count": 74 },
    { "endpoint": "POST /api/mcp", "count": 27 }
  ],
  "monthly": [
    { "usage_type": "ai_chat", "used": 74, "limit": 50, "remaining": 0 },
    { "usage_type": "qr_save", "used": 2, "limit": 5, "remaining": 3 }
  ],
  "limits": { "tier": "free", "rate_per_minute": 20, "max_projects": 10, "max_keys": 2 }
}
401 Unauthorized
{
  "error": "Invalid or missing API key",
  "signup_url": "https://www.collabdraw.com"
}

Rate Limits & Quotas

PlanRate limitAI chatsAI imagesCode exportsKeys
Free20 requests / min50 / month3 / month3 / month2 active keys
Pro120 requests / min150 / month100 / month20 / month10 active keys

Exceeding the rate limit returns 429. Exceeding a monthly quota returns 402 with an upgrade URL. QR codes generated through the Agent follow website rules: unlimited generation, 5 saved per month on Free.

Errors

401

Invalid or missing API key — response includes a signup_url.

402

Plan or monthly usage limit reached — response includes an upgrade_url and remaining usage.

404

Project, page, or session not found (or not owned by this key).

429

Rate limit exceeded — retry after the window resets (60s rolling).

502

The AI model or renderer failed — safe to retry once.

Ready to connect your assistant?

Create your first API key — it takes less than a minute.