Quickstart
Zindex is an agent-native diagram platform. Agents create diagrams by sending structured operations through the Diagram Scene Protocol (DSP).
Choose your integration
Option 1: MCP (recommended for AI agents)
If you’re using Claude Desktop, Cursor, or another MCP-compatible environment, see MCP Setup.
Option 2: HTTP API
Create diagrams by calling the Zindex API directly.
1. Create a scene
curl -s https://api.zindex.ai/v1/scenes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schemaVersion": "0.1",
"scene": {
"id": "my-diagram",
"title": "My First Diagram",
"units": "px",
"canvas": { "width": 800, "height": 400, "background": "#ffffff" }
},
"elements": []
}'
2. Add nodes and edges
curl -s https://api.zindex.ai/v1/scenes/my-diagram/applyOps \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schemaVersion": "0.1",
"sceneId": "my-diagram",
"baseRevision": 1,
"ops": [
{
"op": "createNode",
"id": "api",
"nodeType": "service",
"shape": "roundedRect",
"label": "API Gateway",
"layout": { "mode": "absolute", "x": 50, "y": 150, "width": 180, "height": 70 }
},
{
"op": "createNode",
"id": "db",
"nodeType": "database",
"shape": "cylinder",
"label": "Database",
"layout": { "mode": "absolute", "x": 350, "y": 140, "width": 150, "height": 90 }
},
{
"op": "createEdge",
"id": "e1",
"from": { "elementId": "api" },
"to": { "elementId": "db" },
"label": "queries"
}
]
}'
3. Render to SVG
curl -s https://api.zindex.ai/v1/scenes/my-diagram/render \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "svg" }'
Core concepts
- Scene: A diagram document containing elements, styles, and constraints
- Elements: Nodes, edges, groups, frames, text blocks, images, guides
- Operations: Typed mutations (createNode, createEdge, move, resize, etc.)
- Revisions: Every operation creates a new immutable revision
- Validation: 40+ rules catch errors before they reach the canvas