Skip to main content

Diagram

Generate Mermaid diagrams from a plain English description

$0.03
per call
POST /diagram AI Processing

Try It

This tool requires an API key. Get one from $1 to try it.

curl Example

curl -X POST https://api.aipaygen.com/diagram \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "description": "string",
  "type": "flowchart|sequence|erd|gantt|mindmap"
}'

Python Example

import requests

resp = requests.post(
    "https://api.aipaygen.com/diagram",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
    "description": "string",
    "type": "flowchart|sequence|erd|gantt|mindmap"
}
)
print(resp.json())

Response Format

{
  "result": "<Diagram output>",
  "_meta": {
    "endpoint": "/diagram",
    "model": "claude-sonnet-4-20250514",
    "cost_usd": 0.03
  }
}

Related Tools

Code
$0.05
Explain
$0.02
Outline
$0.02

Get API Key — From $1

$0.25 trial credits free. ~40 AI calls. No subscription.

Get Started

Or install via MCP: pip install aipaygen-mcp