POST
/v1/tools/draw_diagrampricedDraw a diagram
Draws an idea as a clean, flat, labelled diagram (an explainer figure, a schematic, a before and after, a process), every label spelled exactly as given in the brand's font and colours, readable on a phone. Gives a PNG at full size and an SVG to edit.
Takes explains (text), labels (text), title (text). Returns image (the drawing as a PNG, 1080 pixels wide, or 1080 tall when wide), drawing (the same drawing as an SVG, its labels as text in the font, which travels with it, to edit in any design tool).
$0.20 a drawing.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
explains | string | Required | The idea the drawing shows, in a sentence or a few, such as finer cells near a wing where the flow changes fastest. |
labels | string | | The words on the drawing, one label a line, each spelled exactly as it is drawn; at most 10, each at most 60 characters. |
title | string | | A heading across the top, spelled exactly as it is drawn; none when left out. |
aspect_ratio | one of | 1:1 | Its aspect ratio, width to height. 1080 pixels wide, or 1080 tall when wide.9:161:14:516:9 |
background | string | #f5f5f3 | The colour of the ground, such as a Brand Kit's background. |
text | string | #1a1a1c | The colour of the words and outlines, such as a Brand Kit's text; it must read on the background. |
accent | string | #1d4fd8 | The one colour that marks the point of the drawing, such as a Brand Kit's accent. |
font | one of | Inter Tight | The font every label is set in, such as a Brand Kit's font. Inter Tight: Tight and even; every caption style's face. Inter: The plainest, most legible sans; explainers and data. Manrope: Calm, geometric and modern. Hanken Grotesk: Soft, open grotesque; friendly captions that stay easy to read. Archivo: Sturdy grotesque with real weight; news and how-tos. Montserrat: The face most short-form captions are set in. Poppins: Round geometric sans; friendly brands and lifestyle. Figtree: Clean and warm, a little softer than Inter. Bricolage Grotesque: Quirky editorial sans. Rubik: Slightly rounded corners; playful but tidy. Bebas Neue: Tall capitals; titles, numbers and sport. Anton: Heavy, narrow capitals; the loudest hook text. Oswald: Condensed, with weights; lists and labels. League Gothic: Classic condensed gothic; posters and film titles. Fraunces: Soft, old-style serif; warm stories. Playfair Display: High-contrast serif; elegant titles. Instrument Serif: Narrow editorial serif. DM Serif Display: Bold display serif; quotes and headlines. PT Serif: Classic text serif with italics; reports, history and quotes. Caveat: Quick handwriting; notes and asides. Bangers: Comic-book capitals; reactions and gaming. Luckiest Guy: Fat cartoon capitals; kids, gaming and hooks. JetBrains Mono: Monospace; code, terminals and numbers that line up.Inter TightInterManropeHanken GroteskArchivoMontserratPoppinsFigtreeBricolage GrotesqueRubikBebas NeueAntonOswaldLeague GothicFrauncesPlayfair DisplayInstrument SerifDM Serif DisplayPT SerifCaveatBangersLuckiest GuyJetBrains Mono |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/draw_diagram \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{"explains":"…"}'Answer
{
"ok": true,
"result": {
"job_id": "job_…",
"status": "running",
"price_usd": "$…"
}
}It starts at once and answers running. Ask job_status with the job_id for its result. quote gives its price first, free.
Every call can also answer an error: what comes back. Try it with your key from Account.