Skip to content
ToolsOnDuty - free online tools
Browse documentation

Reference / Design

Design API

1 endpoint for design workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/generators/chart2 credits / call

Chart SVG generator

Generate a clean bar or line chart SVG from comma-separated labels and numeric values.

ParameterTypeRequiredDescription
labelsstringYesComma-separated labels (1-20).
valuesstringYesComma-separated non-negative numeric values.
typestringNobar | line. Default: bar.
colorstringNoSix-digit hexadecimal series color. Default: #2563eb.

Request

curl -X POST https://toolsonduty.com/api/v1/generators/chart \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"labels":"Jan,Feb,Mar","values":"12,18,9","type":"bar"}'

Response

{
  "ok": true,
  "data": {
    "type": "bar",
    "width": 720,
    "height": 400,
    "svg": "<svg>...</svg>"
  }
}