Integrations
Integrate with AI agents
How Cursor, Claude, and other agents should discover and call the SayDiagram Public API.
On this page5 sections
Who this is for
Use this when an AI coding agent or automation should create SayDiagram diagrams via the Public API — not when a human is only clicking in the web editor.
Discovery URLs
- https://saydiagram.com/llms.txt — short agent index
- https://saydiagram.com/llms-full.txt — full integration playbook
- https://saydiagram.com/openapi.json — OpenAPI 3.1 (prefer this over /api/… for crawlers)
- https://saydiagram.com/doc/public-api — human API reference
Get an API key
Pro or Team users create keys in Profile → API keys. The secret (sd_live_…) is shown once. Store it only in a server-side secret store — never in browser code, client bundles, or public repos.
Agent workflow
- Fetch /openapi.json or /llms-full.txt to learn the contract.
- Confirm a Pro/Team API key exists (or ask the user to create one in Profile).
- GET /api/v1/me to verify the key and remaining quotas.
- POST /api/v1/diagrams/from-idea or /diagrams/from-image.
- Return the response editorUrl so the user can open the diagram in SayDiagram.
Rules
- Never put API keys in client-side or browser code.
- Call /api/v1 only from trusted server or automation environments.
- Respect daily idea/scan quotas and 429 AI_RATE_LIMIT.
- Free plans cannot create or use API keys (403 API_KEY_PLAN_REQUIRED).
Learn Mermaid · FAQ · Pricing · Dashboard