Co-Pilot API v1 — let AI assistants build designs in CollabDraw
Sign in to create and manage API keys. Keys let external AI assistants (Claude, DeepSeek, custom agents) drive CollabDraw on your behalf.
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.
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/mcpPOST /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"}'https://collabdraw.com/api/v1Bearer token: Authorization: Bearer cd_live_… — 32 hex characters. Missing or invalid keys return 401 with a signup URL.
Import into Claude, ChatGPT actions, or any OpenAPI-aware client.
Open in Swagger Editor/projectsList projects
Returns your cloud projects, newest first, with share links and thumbnails.
limitintegerdefault 20— Number of projects to return (max 100).offsetintegerdefault 0— Pagination offset.{
"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://...signed...",
"thumbnail_expires_at": "2026-11-24T09:13:00Z"
}
]
}/projectsCreate a project
Creates a new project owned by the key owner. Free plans are limited to 10 projects.
titlestring— Project title. Defaults to "Untitled Project".template_idstring— Optional template to start from. Some templates are Pro-only.{
"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 ..."
}{
"error": "Free plan limit of 10 projects reached. Upgrade to Pro for unlimited projects.",
"upgrade_url": "https://www.collabdraw.com/pricing"
}/chatAI 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.
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).{
"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 }
}{
"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://...signed...",
"thumbnail_expires_at": "2026-11-24T09:15:00Z",
"objects_added": 27,
"usage": { "tier": "free", "ai_chats_remaining": 48 }
}/chat/:sessionIdPoll a chat session
Returns the status of a chat session. Poll this after POST /chat when builds take longer than your client timeout.
{
"status": "completed",
"session_id": "f0e1d2c3-...",
"project_id": "a1b2c3d4-...",
"project_url": "https://collabdraw.com/p/xK29fmQaP1",
"thumbnail_url": "https://...signed...",
"thumbnail_expires_at": "2026-11-24T09:15:30Z",
"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"
}/projects/:id/exportExport a project
Downloads the project's first page rendered server-side as an image or document.
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.Binary file download (Content-Disposition: attachment).
{
"error": "SVG export at scale 4 requires a Pro plan.",
"upgrade_url": "https://www.collabdraw.com/pricing"
}/projects/:id/export-codeGenerate website code
Runs the Frame-to-Code pipeline on the project's first frame and returns a working website.
{
"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 }
}{ "error": "No frame found on this project's first page. Frames wrap AI-generated and template content; add one first." }/chartsPlace a chart on a design
Adds a data-driven chart to an existing project's canvas and returns the project link plus the new chart element id. Supports 22 chart types; single-series and multi-series data.
project_iduuidrequired— The design to place the chart on.chart_typestringrequired— One of: bar, horizontal_bar, stacked_bar, grouped_bar, waterfall, lollipop, pos_neg_bar, population_pyramid, line, area, stacked_area, percent_area, scatter, bump, step_line, pie, donut, polar_area, radar, funnel, treemap, radial_bar.dataarrayrequired— Values to plot, max 50 items. Single-series: [{"label": "Jan", "value": 10000}]. Multi-series: [{"label": "Jan", "series": [{"name": "Revenue", "value": 10000}, {"name": "Costs", "value": 4200}]}] (max 8 series). Every item must use the same shape.titlestring— Optional heading drawn inside the chart (max 120 chars).pageinteger— Page number in the design. Defaults to 1.{
"project_id": "a1b2c3d4-...",
"project_title": "Q3 Revenue Report",
"element_id": "e4f5a6b7-...",
"chart_type": "bar",
"title": "Monthly Revenue",
"page_number": 1,
"page_name": "Page 1",
"position": { "x": 320, "y": 176, "width": 560, "height": 400 },
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{
"error": "Invalid chart_type \"bubble\". Supported types: bar, horizontal_bar, stacked_bar, grouped_bar, waterfall, lollipop, pos_neg_bar, population_pyramid, line, area, stacked_area, percent_area, scatter, bump, step_line, pie, donut, polar_area, radar, funnel, treemap, radial_bar"
}{
"error": "data[0] is missing \"value\" (or \"series\" for multi-series charts)"
}{
"error": "Project not found in this account. Call list_projects to get a valid project id."
}/projects/:id/elementsList elements on a design
Returns every element (text, images, shapes, charts, frames) with its element_id, type, position and content. Call this before editing — add, update and delete all need element ids.
pageinteger— Limit results to one page number. Omit to list every page.{
"project_id": "a1b2c3d4-...",
"project_title": "Q3 Revenue Report",
"page_count": 1,
"total_elements": 3,
"pages": [
{
"page_number": 1,
"page_name": "Page 1",
"total_elements": 3,
"elements": [
{ "element_id": "e4f5a6b7-...", "type": "text", "name": "Summer Sale", "x": 120, "y": 80, "width": 400, "height": 48, "visible": true, "text": "Summer Sale", "font_size": 24 },
{ "element_id": "b8c9d0e1-...", "type": "image", "src": "https://...", "x": 100, "y": 200, "width": 480, "height": 320 },
{ "element_id": "c9d0e1f2-...", "type": "chart", "chart_type": "bar", "chart_title": "Monthly Revenue", "frame_label": null }
]
}
],
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}/projects/:id/elements/textAdd text to a design
Adds a text element to an existing project and returns the new element id plus the project link.
textstringrequired— The text content (max 5000 chars).xinteger— Left position. Defaults to centred.yinteger— Top position. Defaults to centred.widthinteger— Text box width.pageinteger— Page number. Defaults to 1.{
"project_id": "a1b2c3d4-...",
"project_title": "Q3 Revenue Report",
"element_id": "e4f5a6b7-...",
"type": "text",
"page_number": 1,
"position": { "x": 320, "y": 380, "width": 560, "height": 40 },
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{ "error": "text is required" }/projects/:id/elements/imageAdd an image to a design
Adds an image from a public https URL — stock photos from /stock-photos, AI images from /images/generate, or any public image link.
srcurlrequired— Public https URL of the image.xinteger— Left position. Defaults to centred.yinteger— Top position. Defaults to centred.widthinteger— Image width in pixels.heightinteger— Image height in pixels.pageinteger— Page number. Defaults to 1.{
"project_id": "a1b2c3d4-...",
"element_id": "b8c9d0e1-...",
"type": "image",
"page_number": 1,
"position": { "x": 360, "y": 240, "width": 480, "height": 320 },
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{ "error": "src must be an https URL pointing at the image" }/projects/:id/elements/shapeAdd a shape to a design
Adds a shape (rectangle, ellipse, star, arrow and more) for backgrounds, buttons, badges and callouts.
shapestring— One of: rectangle (default), ellipse, triangle, diamond, star, heart, pentagon, hexagon, arrow, line, polygon, speech_balloon, thought_balloon, burst, cross, note.fillstring— CSS colour, e.g. "#4A90D9" or "coral". Default #4A90D9.xinteger— Left position. Defaults to centred.yinteger— Top position. Defaults to centred.widthinteger— Shape width.heightinteger— Shape height.pageinteger— Page number. Defaults to 1.{
"project_id": "a1b2c3d4-...",
"element_id": "d0e1f2a3-...",
"type": "shape",
"page_number": 1,
"position": { "x": 480, "y": 310, "width": 240, "height": 180 },
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{ "error": "Invalid shape \"cloud\". Supported shapes: rectangle, ellipse, triangle, ..." }/projects/:id/elements/:elementIdDelete an element (undoable)
Removes one element from the design. The deletion is pushed to the project's undo history, so the canvas user can restore it with Ctrl+Z — never a hard delete.
{
"project_id": "a1b2c3d4-...",
"element_id": "e4f5a6b7-...",
"element_type": "text",
"page_number": 1,
"undo": "The element was moved to the project undo history. It can be restored with Ctrl+Z in the editor.",
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{ "error": "Element e4f5a6b7-... was not found on any page of this project. Call list_elements to see valid element ids." }/templates/:idGet one template in full detail
Fetches the complete record for one template: description, frame size, plan tier, author, fork, usage and comment counts.
{
"id": "pitch-deck-dark",
"name": "Pitch Deck — Dark",
"category": "presentations",
"category_name": "Presentations",
"description": "A 10-slide investor deck with bold section headers...",
"tier": "pro",
"available_on_plan": "pro",
"is_pro_only": true,
"frame": { "width": 1280, "height": 720 },
"tags": ["pitch", "startup"],
"thumbnail_url": "https://...",
"source": "official",
"fork_count": 0,
"usage_count": 0,
"comment_count": 0,
"created_at": null
}{ "error": "Template \"pitch-deck-dark\" was not found. Call list_templates to browse available templates." }/projects/:id/export-frameExport one frame
Downloads just one frame's region rendered server-side — perfect for slide-by-slide or card-by-card exports. Match frames by frame_label from the elements list.
frame_labelstring— A frame_label from GET /projects/:id/elements.formatstringdefault png— png, jpeg, pdf, or svg.scalenumberdefault 1— Scale factor 1-4. Free plans cap at 2; scale 4 is Pro-only.Binary file download (Content-Disposition: attachment).
{
"error": "No frame labelled \"Slide 2\" exists on this page. Use list_elements to see valid frame_label values.",
"available_frame_labels": ["Slide 1", "Slide 3"]
}/projects/:id/elements/:elementId/chartUpdate a chart on a design
Changes the type, data, title or colour scheme of an existing chart element. Only the fields you send change.
chart_typestring— New chart type, e.g. change "bar" to "donut".dataarray— Replacement data, same format as POST /charts.titlestring— New heading (max 120 chars). Empty string removes the title.color_schemestring— Palette id. Empty string resets to default.{
"project_id": "a1b2c3d4-...",
"element_id": "c9d0e1f2-...",
"chart_type": "donut",
"title": "Q3 Revenue",
"color_scheme": "ocean",
"page_number": 1,
"project_url": "https://collabdraw.com/p/xK29fmQaP1"
}{ "error": "Element c9d0e1f2-... is a text, not a chart. update_chart only works on chart elements." }/charts/typesList chart types and colour schemes
Every supported chart type with a one-line description, every palette id, and the exact data format the chart endpoints expect.
{
"chart_types": [
{ "id": "bar", "name": "bar", "description": "Vertical bars, one per category" },
{ "id": "donut", "name": "donut", "description": "Pie with a hole, handy for a centre total" }
],
"color_schemes": ["default", "ocean", "warm", "forest", "sunset", "slate", "vivid", "midnight", "earth", "coral", "arctic", "neon", "mono"],
"data_format": { "limits": { "max_items": 50, "max_series": 8 } }
}/images/generateGenerate an AI image (async)
Generates an image from a text prompt. Returns a job id immediately; poll until the image is ready. Finished images land in the media library (Images > Recent) and are served from collabdraw.com storage.
promptstringrequired— What to draw (max 2000 chars).aspect_ratiostring— 1:1 (default), 16:9, 9:16, 4:3, 3:4, 3:2, 2:3.project_iduuid— Optional design to place the finished image on.{
"job_id": "f1a2b3c4-...",
"status": "generating",
"prompt": "a watercolour fox in a misty forest",
"aspect_ratio": "1:1",
"poll_url": "https://collabdraw.com/api/v1/images/generate/f1a2b3c4-...",
"usage": { "used": 1, "limit": 3, "remaining": 2 }
}{
"job_id": "f1a2b3c4-...",
"status": "completed",
"prompt": "a watercolour fox in a misty forest",
"width": 1024,
"height": 1024,
"image_url": "https://www.collabdraw.com/storage/v1/object/public/<user>/<id>.png",
"completed_at": "2026-11-27T10:02:11Z"
}{
"error": "Free plan limit of 3 AI image generations per month reached. Upgrade to Pro for 100/month.",
"used": 3,
"limit": 3,
"upgrade_url": "https://www.collabdraw.com/pricing"
}/images/remove-backgroundRemove the background from an image
Cuts the subject out of an image — the same model as the in-app Background Remover, with the same plan limits. Returns a transparent PNG on collabdraw.com storage.
image_urlurlrequired— Public https URL of the image to process.project_iduuid— Optional design to place the processed image on.{
"status": "completed",
"image_url": "https://www.collabdraw.com/storage/v1/object/public/<user>/<id>.png",
"source_url": "https://images.pexels.com/...",
"format": "image/png",
"usage": { "used": 4, "limit": 30, "remaining": 26 }
}{ "error": "The image could not be downloaded. Check the URL is publicly reachable (https, no login wall) and points directly at an image file." }/images/analyzeAnalyse an image
Returns an AI description, a prompt that would recreate the image, its dominant colours, and any visible text — powered by the same vision model as the app.
image_urlurlrequired— Public https URL of the image to analyse.tasksarray— Which analyses to run: describe, recreate_prompt, extract_colors, extract_text. Default: describe, extract_colors, extract_text.{
"status": "completed",
"image_url": "https://...",
"description": "A minimal poster with a large coral circle...",
"recreate_prompt": null,
"colors": ["#f28b6b", "#1a2b3c", "#f5efe6"],
"text_found": "SUMMER SALE",
"tasks": ["describe", "extract_colors", "extract_text"]
}{ "error": "Unknown task(s): translate. Supported tasks: describe, recreate_prompt, extract_colors, extract_text" }/usageRead 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.
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.{
"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 }
}{
"error": "Invalid or missing API key",
"signup_url": "https://www.collabdraw.com"
}| Plan | Rate limit | AI chats | AI images | Code exports | Background removals | Keys |
|---|---|---|---|---|---|---|
| Free | 20 requests / min | 50 / month | 3 / month | 3 / month | 30 / month | 2 active keys |
| Pro | 120 requests / min | 150 / month | 100 / month | 20 / month | Unlimited | 10 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. Background removals via the API share the in-app Background Remover allowance.
Invalid or missing API key — response includes a signup_url.
Plan or monthly usage limit reached — response includes an upgrade_url and remaining usage.
Project, page, or session not found (or not owned by this key).
Rate limit exceeded — retry after the window resets (60s rolling).
The AI model or renderer failed — safe to retry once.
Create your first API key — it takes less than a minute.