Diagram AI
Describe a diagram in plain English via GET and get a rendered image back. Powered by AI.
Credit cost: 10 credits per call
Autorización
ApiKeyAuth x-api-key<token>
Your API key. Include it in the x-api-key header for every request.
In: header
Parámetros de consulta
prompt*string
Describe your diagram in plain English (max 1000 chars). Be specific: mention the diagram type, key entities, and relationships.
diagram_type?string
Preferred diagram language. AI chooses if omitted. Examples: "mermaid", "d2", "plantuml", "graphviz".
Default
"mermaid"Value in
- "mermaid"
- "d2"
- "plantuml"
- "graphviz"
output_format?string
Output format. Default: "svg".
Default
"svg"Value in
- "svg"
- "png"
- "jpeg"
- "pdf"
Cuerpo de la respuesta
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/diagram/ai?prompt=string""<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"600\" height=\"400\"> <!-- AI-generated diagram SVG --> </svg>"{ "error": "Bad Request"}{ "error": "Invalid API Key"}{ "error": "Payment required"}{ "error": "Rate limit exceeded for the API key: quota monthly"}{ "error": "Internal Error"}