Divctor API Documentation

Divctor provides SVG charts and flowcharts via a simple HTTP API. All endpoints return SVG images that work in <img> tags, PDFs, static sites, and documentation.

💡 Examples: Every example below is real output from the Divctor API, saved as a static image. Click "Copy" to grab the code, or visit the API Reference for full details.

Quick Start

Get your API key from the Dashboard, then make your first request:

GET
https://api.divct.workers.dev/chart?type=bar&data=10,20,30&apikey=YOUR_KEY

Examples

The charts below are static samples of real API output.

📊 Bar Chart type=bar
Bar Chart
GET
/chart?type=bar&data=45,52,38,65&labels=Q1,Q2,Q3,Q4&apikey=YOUR_KEY
📈 Line Chart type=line
Line Chart
GET
/chart?type=line&data=10,25,35,50,45,70&labels=Jan,Feb,Mar,Apr,May,Jun&apikey=YOUR_KEY
🥧 Pie Chart type=pie
Pie Chart
GET
/chart?type=pie&data=35,25,18,12,7,3&labels=Apple,Samsung,Xiaomi,Oppo,Vivo,Others&apikey=YOUR_KEY
🏔️ Area Chart type=area
Area Chart
GET
/chart?type=area&data=1200,1500,1300,1700,1600,1900&labels=Jan,Feb,Mar,Apr,May,Jun&apikey=YOUR_KEY
🍔 Stacked Bar type=stacked-bar
Stacked Bar Chart
GET
/chart?type=stacked-bar&data=40,45,50,55,60,65&data2=25,28,30,32,35,38&data3=20,22,25,28,30,32&labels=Jan,Feb,Mar,Apr,May,Jun&apikey=YOUR_KEY
🍩 Donut Chart type=donut
Donut Chart
GET
/chart?type=donut&data=40,25,15,12,8&labels=Rent,Food,Transport,Utilities,Fun&apikey=YOUR_KEY
🎯 Scatter Plot type=scatter
Scatter Plot
GET
/chart?type=scatter&data=[{"x":10,"y":20},{"x":25,"y":45},{"x":40,"y":60},{"x":50,"y":52},{"x":60,"y":75},{"x":70,"y":68},{"x":85,"y":90}]&pointStyle=circle&pointSize=6&bgStyle=grid&apikey=YOUR_KEY
🕸️ Radar Chart type=radar
Radar Chart
GET
/chart?type=radar&data=90,75,60,85,70&data2=65,80,90,70,85&labels=JavaScript,Database,DevOps,Design,Testing&apikey=YOUR_KEY

Flowcharts (Graph API)

Generate SVG flowcharts by sending nodes and links as JSON.

🔀 Flowchart POST /graph
Flowchart: Submit, Review, Done
POST
POST /graph?apikey=YOUR_KEY
Content-Type: application/json

{
  "nodes": [
    {"id":"start","label":"Submit"},
    {"id":"review","label":"Review"},
    {"id":"done","label":"Done"}
  ],
  "links": [
    {"source":"start","target":"review"},
    {"source":"review","target":"done"}
  ]
}

Next Steps

🔐 Authentication

Learn how to pass your API key and secure your requests.

Read More →
📊 Chart Types

Explore all 8 chart types with detailed parameters and examples.

Explore →
🚨 Error Codes

Understand what each error means and how to fix it.

View Errors →