EazyDraw Store Support Contact SiteMap
Hot News Screen Shots Applications Features Mobile Gallery Download

The EazyDraw Automation API

A real scripting foundation — better than AppleScript.

EazyDraw includes a local Automation API — a lightweight web service, running inside EazyDraw on your own Mac, that lets a script open and control your drawings. It speaks ordinary REST and JSON over HTTP, so any language that can make a web request can drive EazyDraw: Python, a shell script, JavaScript, Swift, Go, or a Jupyter notebook. It is ideal for batch production, assembling drawings from your library content, connecting EazyDraw to other tools, and — through the same interface — AI-assisted authoring.

The service stays off until you turn it on, listens only on your own machine, and requires a private access token on every request. You are always in control of when it runs and what can reach it.

Why not AppleScript?

Mac drawing programs have traditionally been scripted with AppleScript. It works, but it is a single Mac-only language, its references are positional, and its data does not travel to other tools. The EazyDraw Automation API was designed from the start as a modern, general-purpose foundation:

Language-agnostic. It is plain REST + JSON on localhost. Call it from Python with requests, from the shell with curl, or from any language you already use. You are not locked into one scripting dialect.

Real data structures. Every response is JSON — typed sub-objects like { "x", "y", "width", "height" } for a rectangle, or a list of styled text runs. JSON parses natively in every language; it is not trapped inside the scripting host the way AppleScript records are.

Stable identity across edits and sessions. Every drawing, layer, and graphic carries a persistent UUID. You can name an object once and refer to it reliably, even after it has been moved, restyled, or reshaped — the identifier survives. Positional, “the third rectangle” references break the moment a drawing changes; UUID references do not.

Works from the shell, CI, and notebooks. Requests are stateless HTTP calls with a bearer token — no GUI session to script, no scripting dictionary to host. Run them from a build pipeline, a cron job, or an interactive notebook.

A self-documenting, versioned contract. Every endpoint is documented, versioned under /v1, and reports its version through a /status probe. Proper HTTP status codes tell you exactly what happened, a first-class lock model protects your work, and every call is a single, undoable step in EazyDraw’s Edit menu.

It doubles as your AI foundation. The very same interface is what connects EazyDraw to AI assistants like Claude. Build a script today; the door to agent-assisted drawing is already open. See EazyDraw and Claude.

What you can automate

The API covers the drawing, not just the file. A script can:

Open and manage documents — open EazyDraw, SVG, PDF, DXF, and image files; read page setup, grid, scale, and the current viewport; read and set document metadata.
Create and edit graphics — place parametric shapes (rectangles, ovals, arcs, polygons, lines, diagram figures), author editable Bézier paths from points, insert images and PDF pages, group, duplicate, and name.
Transform — set absolute position, size, and rotation; flip, restack, offset a path into a parallel guide, and move graphics between layers.
Style everything — fill and stroke, dashes, gradients, patterns and textures, hatches, arrows, shadows, variable-width brushes, and schematic wire-crossovers, each from a built-in catalog or by parameter.
Work with rich text — set text, and style it by range: color, the highlight / underline / strikethrough emphasis trio, fonts, alignment, and shadow. Read the styled runs back and write them straight back again. (More below.)
Drive layers — create and reorder layers, toggle visibility, and apply saved named layer arrangements to show optional or conditional regions of a drawing.
Export and render — produce SVG, PDF, PNG, JPEG, or a flat machine-readable .ezdjson, at the whole-drawing, layer, or single-graphic scope.

Rich text, by range

The newest addition is precise, non-destructive control of text. A script reads a text object’s styled runs — every span of the string with the attributes in effect — and edits them by character range or by matching a word. Highlight every occurrence of a term, color one phrase, set a heading bold and larger, align a paragraph, add a drop shadow — without disturbing the rest of the text. Because reading and writing use the same vocabulary, a run read from the drawing can be written straight back, unchanged. Text objects report whether the new content fits their box, so a script can shrink to fit or let linked boxes reflow — EazyDraw never silently resizes your layout.

Python and the command line

A companion Python package makes scripting immediate. Install it with:

pip install eazydraw

Then open a drawing, address a text object by name, and fill it — the client returns ordinary Python dictionaries. Or reach the same endpoints directly with curl for a quick shell task. Everything one script can do, every language can do, because underneath it is just HTTP.

Turning it on

Open EazyDraw Settings, click the Automation API button, generate an access token, and turn the service on. It listens on a configurable local port (52737 by default). The step-by-step guide, including the Settings panel, is in Help.

Learn more

EazyDraw Automation API Reference — every request and response, status codes, and examples.
Turning on the Automation API — the Settings panel, tokens, and the local port.
EazyDraw and Claude — the same API, connected to an AI assistant.

 

This web page designed, created and published entirely with BBEdit and EazyDraw.
EazyDraw, a Dekorra Optics LLC enterprise
Contact: ph +1 608 444 5245 -- mail: N5040 Beach Garden Road, Poynette, WI USA.
Copyright © 2026, All rights reserved.