Skip to Content
SDKs & Examples

SDKs & examples

There’s no official client SDK yet — POST /v1/render is a plain REST endpoint, so any HTTP client works. The examples below cover the two request shapes in three languages.

Render from a template

curl -X POST https://api.drawtab.app/v1/render \ -H "Authorization: Bearer $DRAWTAB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "templateId": "YOUR_TEMPLATE_ID", "variables": { "name": "Sarah Chen", "role": "Keynote Speaker" }, "format": "png", "responseType": "json" }'

Render a custom canvas and save it to disk

curl -X POST https://api.drawtab.app/v1/render \ -H "Authorization: Bearer $DRAWTAB_API_KEY" \ -H "Content-Type: application/json" \ -o output.png \ -d '{ "canvas": { "width": 1200, "height": 630, "backgroundColor": "#0f172a" }, "layers": [ { "type": "text", "x": 60, "y": 280, "width": 1080, "height": 80, "text": "Hello, world", "fontSize": 48, "color": "#ffffff" } ], "format": "png", "responseType": "binary" }'

More