Integrations
Public API
Create diagrams from an idea or image with Pro/Team API keys — Bearer auth to /api/v1.
On this page6 sections
Overview
The public REST API lets scripts and apps create SayDiagram diagrams from a text idea or an image. Keys are available on Pro and Team (including Team members who inherit Pro quotas). Create and revoke keys in Profile → API keys.
Base URL: https://saydiagram.com/api/v1
Authentication
Pass your secret with Authorization: Bearer sd_live_… or the X-Api-Key header. The secret is shown once when you create a key; we store only a hash.
curl -s https://saydiagram.com/api/v1/me \ -H "Authorization: Bearer sd_live_YOUR_SECRET"
Create from idea
POST /api/v1/diagrams/from-idea with JSON { idea, diagramType?, folderId? }. Returns a saved diagram DTO including editorUrl. Counts against your daily idea quota (same as the web app).
curl -s -X POST https://saydiagram.com/api/v1/diagrams/from-idea \
-H "Authorization: Bearer sd_live_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"idea":"User signs up, verifies email, then lands on dashboard","diagramType":"flowchart"}'Create from image
POST /api/v1/diagrams/from-image as multipart file=… or JSON { imageBase64, mimeType?, filename?, folderId? }. PNG, JPEG, or WebP up to 4MB. Counts against your daily image-scan quota.
curl -s -X POST https://saydiagram.com/api/v1/diagrams/from-image \ -H "Authorization: Bearer sd_live_YOUR_SECRET" \ -F "file=@whiteboard.png"
Errors and quotas
- 401 API_KEY_INVALID — missing, revoked, or wrong key
- 403 API_KEY_PLAN_REQUIRED — Free plan (upgrade to Pro or Team)
- 403 IDEA_GENERATE_DAILY_LIMIT / IMAGE_SCAN_DAILY_LIMIT — daily quota used
- 429 AI_RATE_LIMIT — too many AI requests (per-user soft limit)
GET /api/v1/me returns plan and remaining idea/scan/layout usage for the UTC day.
For AI agents
Machine-readable entry points: https://saydiagram.com/llms.txt (index), https://saydiagram.com/llms-full.txt (full playbook), https://saydiagram.com/openapi.json (OpenAPI 3.1). Human agent guide: https://saydiagram.com/doc/agents.
Learn Mermaid · FAQ · Pricing · Dashboard